# Configuration overview

## Settings hierarchy <a href="#settings-hierarchy" id="settings-hierarchy"></a>

You can configure project analysis settings mainly in the UI, in scanner configuration files, and as scanner arguments on the command line. Here is the hierarchy in order of precedence:

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/O2MygeG0lHZqdSqspIDx" alt="Analysis parameters can be set in (from the lowest to the highest priority) : global properties, project properties, scanner configuration files, scanner arguments on the command line."><figcaption></figcaption></figure>

1. **Global properties**: The **Administration** > **Configuration** > **General Settings** menu in SonarQube UI allows you to configure analysis parameter values that will be used as a default for all projects. For some scanners the properties can be defined in a configuration file. See the individual scanner pages for more information.
2. **Project properties:** These properties apply only to the project for which they’re set. You can define them in the UI in the **Project Settings** > **General Settings** menu. Changes to the project properties will override the global properties.
3. **Scanner configuration files**: You can configure scanner parameters in a configuration file within your project or a build framework. Values set in the configuration file will override project properties set in the UI. See the individual scanner pages for more information.
4. **Scanner arguments**: You can also set parameters on the command line used to start the analysis. This can be done with the standalone command-line tool `sonar-scanner` or with any of the build-tool-specific variants such as SonarScanner for Maven and SonarScanner for Gradle. Scanner arguments override the scanner configuration files.

If you use environment variables, which are available for some properties, they will be overridden by scanner arguments.

{% hint style="info" %}
There is an exception to this settings hierarchy. You can use two parameters in the UI, **Global Source File Exclusions** and **Global Test File Exclusions**, to define the analysis scope at the global level and you cannot override them at the project level. For more details, see [Excluding files based on file paths](/sonarqube-server/2025.5/instance-administration/analysis-functions/analysis-scope/excluding-files-based-on-file-paths.md).
{% endhint %}

## General configuration guidelines

Consider the following:

* Most of the analysis parameters you can set in the UI can also be set in scanner configuration files or as scanner arguments by using the corresponding sonar properties (a sonar property is a key/value pair in which the key has the `sonar.<property>` syntax) .
* Sonar property keys are case-sensitive.
* Some analysis parameters cannot be set in the UI; they are listed in [Parameters not settable in the UI](/sonarqube-server/2025.5/analyzing-source-code/analysis-parameters/parameters-not-settable-in-ui.md).
* Only parameters you set through the UI are stored in the SonarQube Server database. Parameters set in the command line or in the scanner configuration files will only be effective for the current analysis and *not* for subsequent analyses or analyses in SonarQube for IDE with connected mode. For example, if you override the `sonar.exclusions` parameter via the command line for a specific project, it will not be stored in the database. Subsequent analyses without the `sonar.exclusions` parameter in the command line or scanner configuration file, or analyses in SonarQube for IDE, will be executed with the exclusions stored in the database.
* See the corresponding SonarScanner section in this documentation for general information about the configuration of analysis parameters in scanner configuration files or as scanner arguments:
  * [SonarScanner for Maven](/sonarqube-server/2025.5/analyzing-source-code/scanners/sonarscanner-for-maven.md)
  * [SonarScanner for Gradle](/sonarqube-server/2025.5/analyzing-source-code/scanners/sonarscanner-for-gradle.md)
  * SonarScanner for NPM: [Configuring the scanner](/sonarqube-server/2025.5/analyzing-source-code/scanners/npm/configuring.md)
  * SonarScanner for .NET: [Using the scanner](/sonarqube-server/2025.5/analyzing-source-code/scanners/dotnet/using.md)
  * [SonarScanner for Python](/sonarqube-server/2025.5/analyzing-source-code/scanners/sonarscanner-for-python.md)
  * [SonarScanner CLI](/sonarqube-server/2025.5/analyzing-source-code/scanners/sonarscanner.md)
* If you use PowerShell, you need to wrap any parameter value that includes a dot (`.`) in either single or double quotes to prevent misinterpretation.
* To adjust the analysis scope of your project, see [Setting analysis scope](/sonarqube-server/2025.5/project-administration/setting-analysis-scope.md).
* To include test coverage in your project analysis, see [Test coverage](/sonarqube-server/2025.5/analyzing-source-code/test-coverage.md).
* To import issues generated by third-party analyzers, see [External analyzer reports](/sonarqube-server/2025.5/analyzing-source-code/importing-external-issues/external-analyzer-reports.md).


---

# 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-server/2025.5/analyzing-source-code/analysis-parameters/configuration-overview.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.
