I’m developing a piece of C++ firmware to run on a C2000 processor, but I’m also cross-compiling for Visual Studio 2019 so I can run unit tests and get code coverage metrics.
When SonarQube runs against the C2000 build it correctly picks up C++03 from the compiler, and has suggestions relevant to the C++03 features of the language.
When SonarQube runs against the Visual Studio 2019 build, it insists in analyzing the source code with C++11/14 suggestions totally unsuitable for the code-base. Visual Studio 2019 cannot be set for any version earlier than C++14, but that’s fine because we’re just not using newer features.
Linux only recently jumped from C89 to C11 despite GCC having C17 support for ages. Godot limits itself to C++03 despite building on Visual Studio 2019. There are many reasons for a project to limit itself to older language revisions to ensure portability. It would be really useful if SonarQube could be told what revision of the language so a project doesn’t get innundated with language suggestions it’s not able to take.