Scan the code with sonar-scanner

1. Download

First download the sonar-scanner scanner

sonar-scanner scanner download

Choose your own suitable type

My own windows sonar-scanner scanner windows direct download

2. Installation and configuration

 After downloading and decompressing, configure the environment variable and it will be ok

(1) For example, I put it on the D drive   and copied it to the address of bin and put it in the path. After decompression, I changed the name to sonar-scanner

  (2) Open the configuration environment variable, find the path in the system variable, and create a new one to install the sonar-scanner address

 (3) Win+r enter cmd, enter the command sonar -scanner -v to get the version information, indicating that the installation is successful.

 3. Use (based on the sonar-scaner account opened by the company)

1. In 分析你的项目the module, select 其他the build technology, select the system, and then click 复制:

 2. After 终端opening the project address, paste the command you just copied into the terminal, and press Enter to run

3. After waiting for the execution to complete, return to the browser sonarqube and there will be a check result

Guess you like

Origin blog.csdn.net/enhenglhm/article/details/127625361