![]() ![]() This folder must contain a sonar-project.properties file if sonar.projectKey is not specified on the command line. The root folder of the project to analyze can be set through the sonar.projectBaseDir property since SonarScanner 2.4.Example: sonar-scanner ttings=./myproject.properties The property ttings can be used to specify the path to the project configuration file (this option is incompatible with the sonar.projectBaseDir property).Example: sonar-scanner -Dsonar.projectKey=myproject -Dsonar.sources=src1 The properties can be specified directly through the command line.If a sonar-project.properties file cannot be created in the root directory of the project, there are several alternatives: You'll find them filed under sonarqube-scanner/src. To help you get started, simple project samples are available for most languages on GitHub. You can find full details on the C/C /Objective-C language page. Scanning projects that contain C, C , or Objective-C code requires some additional analysis steps. Sonarsource/sonar-scanner-cli Scanning C, C , or ObjectiveC projects e SONAR_SCANNER_OPTS="-Dsonar.projectKey=$" \ To scan using the SonarScanner Docker image, use the following command: docker run \ Running SonarScanner from the Docker image Run the following command from the project base directory to launch analysis and pass your authentication token: sonar-scanner -Dsonar.login=myAuthenticationToken.You should get output like this: usage: sonar-scanner Options: -D,-define Define property -h,-help Display help information -v,-version Display version information -X,-debug Produce execution debug output If you need more debug information, you can add one of the following to your command line: -X, -verbose, or -Dsonar.verbose=true. Verify your installation by opening a new shell and executing the command sonar-scanner -h ( sonar-scanner.bat -h on Windows).Update the global settings to point to your SonarQube server by editing $install_directory/conf/sonar-scanner.properties: #- Default SonarQube server #=.Expand the downloaded file into the directory of your choice.To run SonarScanner from the zip file, follow these steps: #sonar.sourceEncoding=UTF-8 Running SonarScanner from the zip file ![]() # Path is relative to the sonar-project.properties file. Configuring your projectĬreate a configuration file in your project's root directory called sonar-project.properties # must be unique in a given SonarQube instance The SonarScanner is the scanner to use when there is no specific scanner for your build system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |