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

# Excluding based on file extension

In SonarQube Server 2026.4, for each programming language, define the file extensions to be analyzed.

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 the [Retrieving projects](/sonarqube-server/2026.4/user-guide/viewing-projects/retrieving-projects.md) page 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).

<div align="left"><figure><img src="https://content.gitbook.com/content/2oR4S7aAgfaoiEmIKjM5/blobs/6WOzjaBtSprK6M8qLGLL/projects-file-suffixes.png" alt="Defining file suffixes in SonarQube user interface."><figcaption></figcaption></figure></div>

## 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/2026.4/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/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/exclude-from-coverage-duplication.md)
* [Excluding based on path-matching patterns](/sonarqube-server/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/excluding-files-based-on-patterns.md)
* [Applying advanced exclusions](/sonarqube-server/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/advanced-exclusions.md)
* [Other adjustments](/sonarqube-server/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/other-adjustments.md)
* [Setting initial scope](/sonarqube-server/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/setting-initial-scope.md)
* [Introduction](/sonarqube-server/2026.4/instance-administration/analysis-functions/analysis-scope/introduction.md)


---

# 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-server/2026.4/project-administration/adjusting-analysis/setting-analysis-scope/excluding-based-on-file-extension.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.
