Start FreeLog in
SonarQube Cloud | Managing your project | Setting up project analysis | Analysis scope | Excluding based on file extension

Excluding files from your project analysis based on file extension

On this page

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

  1. Retrieve your project.
  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

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.

PropertyDescription
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 Defining file suffix parameters in the UI above.


Was this page helpful?

© 2008-2025 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License