- CI used : Azure DevOps with sonar cloud task
- Languages of the repository : c#
Hi,
I recently move on a project with a SonarCloud integration and I have an issue for a specific project architecture.
I have 3 projects .net core 3.1
- Project1
- Project2
- ProjectShared
And for each, a test project associated.
Project 1 and 2 reference ProjectShared by project reference and they share the same naming convention for file and folder (So, it’s complex to create pattern for file exclusion).
When I launch the analysis on each project I would like to have result scoped on the current analysed project and his test project associated.
I can not add a <SonarQubeExclude>true</SonarQubeExclude>
on ProjectShared otherwise I won’t be able to analyse it.
Example log in Run Code Analysis for Project1
INFO: Project configuration:
INFO: Excluded sources: **/build-wrapper-dump.json, **/obj/**, **/*.dll
INFO: Indexing files of module 'ProjectShared'
INFO: Base dir: D:\a\1\s\ProjectShared
INFO: Source paths: Some files, Model/class1.cs...
INFO: Excluded sources: **/build-wrapper-dump.json, **/obj/**, **/*.dll
INFO: Indexing files of module 'Project1'
INFO: Base dir: D:\a\1\s\Project1
INFO: Source paths: Some files, Model/class2.cs...
INFO: Excluded sources: **/build-wrapper-dump.json, **/obj/**, **/*.dll
How to correctly analyse each project in this case without use SonarQubeExclude on the shared project?
Thanks