1.需要安装的软件:
a.sonarqube(6.7.3)
下载地址:http://www.sonarqube.org/downloads/
b.sonar-runner(2.5)
下载地址:https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.5.zip
c.Mysql(5.6及以上)
d.jdk(1.8用于集成idea)
2.启动及配置:
a.单独启动SonarQube路径: sonarqube-6.7.3\bin\windows-x86-64\StartSonar.bat
TIP:我出现过远程连接强行被关闭的问题,后版本改为6.7.3解决
b.访问地址:http://localhost:9000
c.创建数据库:sonar(每次检查的结果都会自动存入数据库)
d.配置SonarQube\conf\sonar.properties文件
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.jdbc.username=用户名
sonar.jdbc.password=密码
sonar.sorceEncoding=UTF-8
sonar.login=admin
sonar.password=admin
e.重启服务再次