This version of SonarQube Server is no longer receiving patches. Please see the latest release for details on updating.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Excluding based on file extension

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

For AI agents: You're in the SonarQube Server 2025.5 documentation. SonarQube Server 2025.5 is no longer patched. To get patches, upgrade to the latest version. For a list of all 2025.5 pages, see the SonarQube Server 2025.5 page index. For the whole site, see the page index or the full text. For another version, replace 2025.5 in the URL with that version. The latest version has no version number in its URL.

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

  1. Retrieve your project. See Retrieving projects 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).

Defining file suffixes in SonarQube UI

Defining file suffix parameters on the CI/CD host

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.

Property key

Description

sonar.<language>.file.suffixes

Defines for a given programming language a set of extensions (file suffixes) to be analyzed (The other extensions will be ignored.).

Possible values: Comma-separated list of file extensions.

Note: You can see the exact property key syntax on the UI: see above.

Last updated

Was this helpful?