# 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="/files/ukC3AJFPmt3LYpirs0Lq" alt="Analysis parameters can be set in (from the lowest to the highest priority) : project properties, scanner configuration files, scanner arguments on the command line."><figcaption></figcaption></figure>

1. **Organization properties** (Enterprise only): As an organization admin, you can define analysis scope adjustments at the organization level in the SonarQube UI by going to *Your Organization* > **Administration** > **Analysis Scope**.
2. **Project properties:** As a project admin, you can change these properties in the SonarQube UI and apply them to your project by going to *Your Organization* > *Your Project* > **Administration** > **General Settings**.
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 organization and project properties set in the UI. See the individual scanner pages for more information.
4. **Scanner arguments**: For CI-based analysis, you can also set parameters on the command line. 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.

## General configuration guidelines

Consider the following:

* A few analysis parameters are mandatory.
* Many analysis parameters, such as those defining the analysis scope, have a default value and can be adjusted.
* Other parameters allow you to include the code and test coverage in your analysis, or to import issues generated by a third-party analyzer, etc.
* It is recommended to set the analysis parameters in the SonarQube Cloud UI when possible because it allows a centralized, reliable, and user-friendly configuration.
* 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) .\
  To retrieve the sonar property key of a parameter set in the UI, go to the UI page where this parameter is set. The property key is displayed near the analysis parameter field. Note that it’s strongly advised **not** to define multiple-value and multiple-criteria parameters through sonar properties on the CI/CD host.
* 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-cloud/analyzing-source-code/analysis-parameters/parameters-not-settable-in-ui.md).
* Only parameters you set through the UI are stored in the SonarQube Cloud 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-cloud/analyzing-source-code/scanners/sonarscanner-for-maven.md)
  * [SonarScanner for Gradle](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-for-gradle.md)
  * SonarScanner for NPM: [Configuring the scanner](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-for-npm/configuring.md)
  * SonarScanner for .NET: [Using the scanner](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-for-dotnet/using.md), including [Using the scanner](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-for-dotnet/using.md#passing-properties) for prefix conventions
  * [SonarScanner for Python](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-for-python.md)
  * [SonarScanner CLI](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-cli.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 [Analysis scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope.md).
* To include test coverage in your project analysis, see the [Test coverage](/sonarqube-cloud/analyzing-source-code/test-coverage.md) pages.
* To import issues generated by third-party analyzers, see the [External analyzer reports](/sonarqube-cloud/analyzing-source-code/importing-external-issues/external-analyzer-reports.md) page.


---

# 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/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.
