None of these key/value pairs are read (they are not valid), nor should their analysis parameter equivalent be needed if, for example, only the specific subproject is being built in the pipeline (and no others).
If further exclusions/inclusions need to be carried out after, they can be done by adjusting the Analysis Scope with sonar.exclusions and sonar.inclusions
Our multiple MSBuild-Projects have each their own Solution File and in that SLN Files there are other projects linked with some GUIDs.
The sonar scanner shows this GUIDs all listed under “- sonar.modules” and analyses them modules/projects one after another.
I think we could work here with some exclusions but the way would be in my opinion to ged rid of those solution file references where they are not needed.
Or is there some special property in sonarcloud for this scenario - something like “omitModules” ?
So we ended up using CLI Scanner for every build (regardless if .net, JS or something else) - because it seems its the only thing thats working properly with Azure Devops and Sonarcloud.
scannerMode: "MSBUILD"
does not work here:
it takes sources from anywhere of the monorepo
if we specifiy “src” and “tests” ist gives errors like “can’t be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files”, although src and test folder is on the same level.
You will not be able to receieve any feedback on .NET code if you use the Scanner CLI. The Scanner for .NET must be used.
It sounds like you’re defining sonar.sources manually somewhere. You should not, and rely on the build only building what you need (and, using inclusions/exclusions for further filtering)