Start FreeLog in
SonarCloud | Administering your SonarCloud | Setting configurations at organization level | Adjusting analysis scope | Excluding from coverage or duplication

Was this page helpful?

Excluding specific files from code coverage or duplication check at the organization level

On this page

This feature is only available in an Enterprise plan organization.

As an organization admin, you can exclude specific files from code coverage or duplication check at the level of the organization. It means that this analysis scope adjustment applies to all projects in the organization. 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:

  1. Retrieve the organization.
  2. Go to Administration > Analysis scope.
  3. In Code coverage > Coverage Exclusions, enter and save a path-matching pattern to define files to be excluded from the code coverage analysis: see Wildcard patterns in Analysis scope.

Excluding specific files from the duplication check

To exclude specific files from the duplication check (detection of identical lines of code):

  1. Retrieve the organization.
  2. Go to Administration > Analysis scope.
  3. In Duplication > Duplication Exclusions, enter and save a path-matching pattern to define files to be excluded from the duplication check: see Wildcard patterns in Analysis scope.

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License