> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/setting-config-at-org-level/adjusting-analysis-scope/exclude-from-coverage-duplication.md).

# Excluding from coverage or duplication

Excluding specific files from code coverage or duplication check can be defined at the organization level for your SonarQube Cloud organization.

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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
