Parameters to configure project analysis can be set in multiple places. Here is the hierarchy of parameters:
- Global analysis parameters, defined in the UI, apply to all the projects
- Project analysis parameters, defined in the UI, override global parameters
- Project analysis parameters, defined in a project analysis configuration file or an analyzer configuration file, override the ones defined in the UI
- Analysis / Command line parameters, defined when launching an analysis, override project analysis parameters
sonar.profileparameter via command line for a specific project, it will not be stored in the database. Local analyses in Eclipse, for example, would still be run against the default quality profile.
JDBC Connection URL
User for the JDBC Connection
Password for the JDBC Connection
The project key that is unique for each project.
Name of the project that will be displayed on the web interface.
The project version.
Set the language of the source code to analyze. Browse the Plugin Library page to get the list of all available languages. If not set, a multi-language analysis will be triggered.
Comma-separated paths to directories containing source files.
The project description.
Comma-separated paths to directories containing the binary files (directories with class files, in the case of Java).
Comma-separated paths to directories containing tests.
Comma-separated paths to files with third-party libraries (JAR files in the case of Java). Patterns can be used.
Note that the * wildcard character is not supported for directories, only for files.
This property is used by rule engines during issues detection (mainly the SonarQube and FindBugs engines, which both rely on bytecode). Having the bytecode of these libraries allows the rules engines to get more information on coupling, possible null parameters when calling external APIs, etc., thus getting more accuracy during issue detection.
Set the analysis mode. See Concepts.
Set the source file encoding.
Encoding of source files. Example of values: UTF-8, MacRoman, Shift_JIS. This property can be replaced by the standard property
The list of available encodings depends on your JVM. See http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html.
Allow or suppress the import of the text of source files into SonarQube.
For security or other reasons there are times when project sources must not be stored and displayed. Set this value to false to prevent the text of a project's source files from being available via the SonarQube interface to anyone at all.
Assign a date to the analysis.
Note: This parameter is applicable to a few, special use cases, rather than being an "every day" parameter:
To answer those use cases, you can use the sonar.projectDate property. The format is
The process is the following:
Note: You must analyze your versions in chronological order, oldest first.
Manage SCM branches. Two branches of the same project are considered to be different projects in SonarQube.
Override the profile that would normally be used to analyze a project.
Through the web interface, you can define as many quality profiles as you want, and you can easily associate one of these quality profiles to a given project though the web interface.
Default profile for the given language
Skip the computation of design metrics and dependencies.
Currently only available for Java.
Set the working directory for an analysis triggered with the SonarQube Runner or the SonarQube Ant Task (versions greater than 2.0).
Path must be relative and unique for each project.
Beware: the specified folder is deleted before each analysis.
Exclusions / Inclusions
See Narrowing the Focus to:
- Exclude files from analysis
- Prevent some files from being checked for duplications
- Prevent some files from being taken into account for code coverage by unit tests and integration tests
- Ignore issues on certain components and against certain coding rules
|Display logs to see where the analyzer spends time.|
|Display all the SQL queries executed by the analyzer.|
|Display the results of all the SQL queries executed by the analyzer.|
|Activate DEBUG mode for the analyzer.|