> 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-server/2025.3/project-administration/setting-analysis-scope/excluding-based-on-file-extension.md).

# Excluding based on file extension

You can define a set of extensions (file suffixes) for each programming language to be analyzed (The other extensions will be ignored).

You can perform the setup in SonarQube UI (this requires that you have the project’s Administer permission) or on the CI/CD host. A parameter set on the CI/CD host has precedence over any UI setting of the same parameter.

## Defining file suffix parameters in the UI <a href="#in-the-ui" id="in-the-ui"></a>

1. Retrieve your project. See [Retrieving projects](/sonarqube-server/2025.3/user-guide/viewing-projects/retrieving-projects.md) for more information.
2. Go to **Project Settings > General Settings > Languages**.
3. In the drop-down list, select the language you want to configure.
4. Navigate to the section containing the file suffixes.
5. Define the extensions to be analyzed (default values are provided).

<figure><img src="/files/oH1cKCFPCLk8F9FzE0XP" alt="Defining file suffixes in SonarQube UI"><figcaption></figcaption></figure>

## Defining file suffix parameters on the CI/CD host <a href="#on-ci-cd-host" id="on-ci-cd-host"></a>

The table below lists the properties you can use to define on the CI/CD host file suffixes to be analyzed for a given language. For more information, see [Analysis parameters](/sonarqube-server/2025.3/analyzing-source-code/analysis-parameters.md).

| **Property key**                | **Description**                                                                                                                                                                                                                                                                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sonar.\<language>.file.suffixes | <p>Defines for a given programming language a set of extensions (file suffixes) to be analyzed (The other extensions will be ignored.).</p><p><strong>Possible values</strong>: Comma-separated list of file extensions.</p><p><strong>Note</strong>: You can see the exact property key syntax on the UI: see above.</p> |

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Excluding from coverage or duplication](/sonarqube-server/2025.3/project-administration/setting-analysis-scope/exclude-from-coverage-duplication.md)
* [Excluding based on path-matching patterns](/sonarqube-server/2025.3/project-administration/setting-analysis-scope/excluding-files-based-on-patterns.md)
* [Applying advanced exclusions](/sonarqube-server/2025.3/project-administration/setting-analysis-scope/advanced-exclusions.md)
* [Other adjustments](/sonarqube-server/2025.3/project-administration/setting-analysis-scope/other-adjustments.md)
* [Setting initial scope](/sonarqube-server/2025.3/project-administration/setting-analysis-scope/setting-initial-scope.md)
* [Introduction](/sonarqube-server/2025.3/instance-administration/analysis-functions/analysis-scope/introduction.md) to Analysis scope


---

# 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 dynamically by asking a question.

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

```
GET https://docs.sonarsource.com/sonarqube-server/2025.3/project-administration/setting-analysis-scope/excluding-based-on-file-extension.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
