Parameters

Following we have gathered the most common parameters used in analysis.

SonarScanner

Parameter Description Example of usage
sonar.projectKey The project's unique key. Allowed characters are: letters, numbers, -, _, . and :, with at least one non-digit. -Dsonar.projectKey="$JOB_NAME" 
sonar.projectName Name of the project that will be displayed on the web interface. -Dsonar.projectName="$JOB_NAME"
sonar.sources Comma-separated paths to directories containing main source files.
Read from build system for Maven, Gradle, MSBuild projects. Defaults to project base directory when neither sonar.sources sonar.tests is provided.
-Dsonar.sources=.
sonar.projectVersion The project version. After you change this parameter, the "New Code" tab will show difference between previous version and current one. -Dsonar.projectVersion=1.0
sonar.coverageReportPaths Path to export the coverage report -Dsonar.coverageReportPaths=
"$WORKSPACE/codecoverage/codecoverage.xml"
sonar.objectscript.codeVersion Version of the IRIS or Caché database for which the code is intended. -Dsonar.objectscript.codeVersion=2020.4
-x Enables debug information. -x

 

See also: Analysis Parameters