python-sonar

sonar如何安装网上很多,不写了。

本地sonar安装完成后,修改配置文件:

#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=https://sonar.xxxxx.com/

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

#----- Global database settings (not used for SonarQube 5.2+)
sonar.jdbc.username=sonar
sonar.jdbc.password=xxxxxxxxx

sonar.login=qa-admin
sonar.password=xxxxxxxx

#----- MySQL
sonar.jdbc.url=jdbc:mysql://yourIP:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false

被测项目路径下,新增配置文件:sonar-project.properties,内容如下:

sonar.projectKey=TH_QAPF
sonar.projectName=TH_QAPF
sonar.projectVersion=1.0
sonar.sources=.
sonar.language=py
sonar.sourceEncoding=UTF-8
sonar.scm.disabled=true

配置文件已python为例

被测项目根目录,也就是sonar-project.properties文件所在路径下,打开cmd,输入sonar-scanner,执行。

出现上图内容为成功

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值