# Excluding based on file extension

You can define for each programming language a set of extensions (file suffixes) 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-cloud/managing-your-projects/retrieving-projects.md) for more details.
2. Go to **Administration** > **General Settings** > **Languages**.
3. In the drop-down list, select the language you want to configure.
4. In the **General** > **File suffixes** parameter, define the extensions to be analyzed (default values are provided).

## 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-cloud/analyzing-source-code/analysis-parameters.md).

| **Property**                    | **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 <strong>Defining file suffix parameters in the UI</strong> above.</p> |

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

* [Setting initial scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/setting-initial-scope.md)
* [Excluding from coverage or duplication](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/exclude-from-coverage-duplication.md)
* [Excluding based on path-matching patterns](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/excluding-files-based-on-patterns.md)
* [Excluding based on file extension](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/excluding-based-on-file-extension.md)
* [Advanced exclusions](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/advanced-exclusions.md)
* [Other analysis scope adjustments](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/other-adjustments.md)
* [Verifying analysis scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/verifying-analysis-scope.md)
* [Introduction](/sonarqube-cloud/administering-sonarcloud/managing-organization/setting-config-at-org-level/adjusting-analysis-scope/introduction.md) to Adjusting analysis scope


---

# 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/managing-your-projects/project-analysis/setting-analysis-scope/excluding-based-on-file-extension.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.
