Hello,
We have a C# project analyzed in SonarCloud, the first analyse included the UnitTests project, which had some issues.
We decided to exclude this project from the analysis, so we changed the sonar.exclusions setting in our YAML pipeline like below:
- task: SonarCloudPrepare@1
displayName: Prepare analysis
continueOnError: true
condition: succeeded()
inputs:
SonarCloud: 'SonarCloud'
organization: 'Our_Organization'
scannerMode: 'MSBuild'
projectKey: '$(Build.Repository.Name)'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
# sonar.exclusions=**/*.bin
sonar.exclusions=**/*.demo/**,**/*.Demo/**,**/Properties/**,**/SqlServerTypes/**,**/*.xsd,**/*.map,**/*.config,**.test*/**,**.Test*/**,**.IntegrationTests/**,**.UnitTests/**,**/*.js,**/*.html,**/*.htm,**/*.css,**/*.xml,**/*.sql,**/Migrations/**
After a new analysis, the project.UnitTests does not show any more any number of lines of code, coverage or duplication. But issues are still there.
Shouldn’t the project fully disappear in the code view, and issues also being removed ?
Anything we are doing wrongly ?
Any way to get rid of them besides deleting the project and doing a complete new analysis (and losing the history) ?
thanks for your help