Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube : 7.4 -
what are you trying to achieve:
I am trying to run sonarqube code analysis through AzureDevOps, however when i added specific visual studio (csproj) projects under exclusions it doesnt pick and it still scans. -
what have you tried so far to achieve this
I have added below things so far.
- my first job is to “prepare analysis on Sonarqube” underneath under advance options i have added
sonar.exclusions=***.Repository.csproj, ***.bin, ..Repository.dll$ , ./.dto.dll$, ***.Test.csproj, **.entity.dll$, ***.DTO.csproj, ***.Data.csproj, Concrete/ProductRepository.cs - added ***.Repository.csproj under exclusions on Sonarqube Administration-> General settings.
- Added the same policies in my Testsettings file as well.
- changed General settings from default level to see if it clears old values and picks a new one.
- Lastly restarted SonarQube service.
I have attached screenshot and you can see i want to exclude “repository” but it is still capturing the values, however when i tried with “test” names it perfectly excludes and shows 0.
Help will be appreciated.
Thanks,
Prashanth Kumar