sonarqube

1.下载好sonarqube后,解压打开bin目录,启动相应OS目录下的StartSonar。

配置sonarqube,在sonarqube解压目录下conf下打开sonar.properties加入下面配置

sonar.jdbc.username=root
sonar.jdbc.password=123456
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.port=9000

配置sonar-scanner,在解压目录conf下sonar-scanner.properties编辑加以下配置信息 

#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here

#----- Default SonarQube server
#sonar.host.url=http://localhost:9000

#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

sonar.jdbc.username=root
sonar.jdbc.password=123456
sonar.jdbc.url=jdbc:mysql://127.0.0.1:3306/sonar?useUnicode=true&characterEncoding=utf8

 然后配置环境变量在电脑-环境变量高级-Path加入sonar-scanner-4.7.0.2747-windows\bin然后查看版本信息sonar-scanner -v

 直接看最后我的结果

 

posted @ 2025-04-29 09:01  艾鑫4646  阅读(16)  评论(0)    收藏  举报