# Excluding from coverage or duplication

This feature is only available in the [Enterprise plan](https://www.sonarsource.com/plans-and-pricing/#sonarqube-cloud-features).

As an organization admin, you can exclude specific files from code coverage analysis 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. For more information about setting your scope at the project level, see the [Introduction](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/introduction.md) page in the [Analysis scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope.md) section.

## Excluding specific files from the code coverage analysis <a href="#from-coverage" id="from-coverage"></a>

To exclude specific files from the code coverage analysis.

1. Retrieve your organization. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) for more details.
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 [Defining matching patterns](/sonarqube-cloud/appendices/defining-matching-patterns.md)for more details.

## Excluding specific files from the duplication check <a href="#from-duplication" id="from-duplication"></a>

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

1. Retrieve your organization. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) for more details.
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 [Defining matching patterns](/sonarqube-cloud/appendices/defining-matching-patterns.md) for more details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/setting-config-at-org-level/adjusting-analysis-scope/exclude-from-coverage-duplication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
