Welcome to the community @Carl!
For the purpose of investigation could you please provide the full content of the sonar-scanner-log with debug enabled (-X passed to sonar-scanner invocation) and your compilation database file (compile-commands.json)? If you think this file contains private information, let us know, and we’ll send you a private message that will allow you to send it privately.