Forrest logo
back to the sonar-scanner tool

sonar-scanner:tldr:2f727

sonar-scanner: Scan a project using configuration file other than `sonar-project.properties`.
$ sonar-scanner -D${project-settings=myproject-properties}
try on your machine

The command "sonar-scanner -D${project-settings=myproject-properties}" is used to run the SonarScanner tool with a specific project settings file. Here is a breakdown of the command:

  • "sonar-scanner": This is the executable command for running the SonarScanner tool, which is used for analyzing and managing code quality.

  • "-D": This option is used to pass additional properties or settings to the SonarScanner.

  • "${project-settings=myproject-properties}": This is the specific parameter being passed to the SonarScanner tool. It sets the value of the "project-settings" property to "myproject-properties".

In this case, the "myproject-properties" file contains the project-specific settings, such as SonarQube server URL, database connection details, and other configuration options. By using this command, the SonarScanner tool will use the specified project settings file during the code analysis process.

Note that the actual file path or name for the "myproject-properties" may vary depending on the specific project setup.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the sonar-scanner tool