SonarQube Community Build | Instance administration | Global analysis setup | Analysis scope | Excluding from coverage or duplication
Excluding specific files from code coverage analysis or duplication check at the global level
As a system administrator, you can exclude specific files from code coverage analysis or duplication check at the global level. It means that this analysis scope adjustment applies to all projects in your instance. However, they can be overridden at the project level in the UI or through analysis parameters set on the CI/CD host.
Excluding specific files from the code coverage analysis
To exclude specific files from the code coverage analysis:
- Go to Administration > Configuration > General Settings > Analysis Scope.
- In B. Code coverage Exclusions, enter and save a path-matching pattern to define files to be excluded from the code coverage analysis: see Defining path-matching patterns.
Excluding specific files from the duplication check
To exclude specific files from the duplication check (detection of identical lines of code):
- Go to Administration > Configuration > General Settings > Analysis Scope.
- In C. Duplication Exclusions, enter and save a path-matching pattern to define files to be excluded from the duplication check: see Defining path-matching patterns.
Related pages
Was this page helpful?