Excluding based on file extension
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
Retrieve your project. See Retrieving projects for more information.
Go to Project Settings > General Settings > Languages.
In the drop-down list, select the language you want to configure.
Navigate to the section containing the file suffixes.
Define the extensions to be analyzed (default values are provided).

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.
Related pages
Last updated
Was this helpful?