Hi @joanpereyra,
I assume you are using Visual Studio in solution mode.
While exclusion/inclusion is synchronized from the server, the language of a header file is detected from the vcxproj setting. Here is an explanation of how to change it to C: C project parsed with C++ rules - #3 by Abbas
This allows you to force the language of header files per vcxproj.
Side note:
-
I don’t think having two projects on SonarQube is ideal. If the analysis is triggering a C++ issue on a
.hfile, it means the.hfile was included in a source file compiled as C++ according to the build-wrapper JSON. -
If this is the case, and you still want to keep this file C compliant, I expect that you wrap the code with
extern Cin case__cplusplus. -
Since the post, we improved our C++ rules to not trigger in
extern Ccontext. If they did when you analyzed your codebase in one project, I invite you to post the rules that were triggered on this forum and we will treat them as false-positive and fix them.