当前位置:网站首页>sonarqube平台基础使用
sonarqube平台基础使用
2022-06-11 02:44:00 【肖肖0523】
1、执行sonar方式:
jenkins构建时,执行sonar代码检查
jenkins配置参见:T-GKPT-Server(我司jenkins平台的项目,具体如下)
Analysis properties内容如下(java代码):
sonar.projectKey=${JOB_NAME}
sonar.projectName=${JOB_NAME}
sonar.projectVersion=1.0
sonar.sources=.
sonar.java.binaries=.
sonar.sourceEncoding=UTF-8
sonar.language=java
sonar.scm.disabled=true
sonar.java.source=1.8下方为jenkins打包运行过程中解析的数据:
Analysis properties内容如下(JavaScript代码):
sonar.projectKey=${JOB_NAME}
sonar.projectName=${JOB_NAME}
sonar.projectVersion=1.0
sonar.sources=.
sonar.projectBaseDir=src
sonar.sourceEncoding=UTF-8
sonar.language=js下方为jenkins打包运行过程中解析的数据:
2、jenkins与sonar关联
执行后sonar检查结果自动显示在sonarqube平台中(我司搭建的此平台)
jenkins配置如下:
1、configure system【配置sonarqube平台地址】
2、 Global Tool Configuration
1)配置MSbuild
2)配置SonarScanner for MSBuild
3) SonarQube Scanner
3、Manage Nodes and Clouds
1)设置master或slave节点(需要打包的服务器)
2)打包的服务器节点上,安装sonar-scanner
a)windows上安装绿色版的,直接解压为文件夹
b)修改配置文件【/conf/sonar-runner.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://172.17.2.10:9000/sonarqube#----- Default source code encoding
sonar.sourceEncoding=UTF-8c)设置环境变量(可能是非必须步骤,未验证)
3、登录sonarqube平台并查看检查结果

关注内容:
1、bugs和漏洞:一般关注这两项即可,其余可不关注
2、当bugs或漏洞不为0时,点击数字,进入具体内容
如点击漏洞上方数字,进入漏洞界面:
严重程度为阻断和严重的,一般需要处理;(具体是否解决,解决到何种程度,询问项目经理即可)
3、
4、质量配置-配置检查规则
各种不同的代码,配置不同的规则

边栏推荐
- 关于玩家身上有个普通Set并发安全的讨论
- UBIFS FAQ and HOWTO
- CPT 102_ LEC 15
- OpenJudge NOI 1.13 18:Tomorrow never knows?
- HOSATAPD_ CLI debug using WiFi whitelist
- Three special data types, day3 and redis (geographic location, cardinality statistics and bitmap scene usage)
- Stringutils string tool class used by FreeMarker to create templates
- B_QuRT_User_Guide(18)
- 数组全全排列
- AOSP ~ logcat chatty line expired
猜你喜欢

银行选择电子招标采购的必要性

Unity项目优化详解(持续补充ing)

完成千万元A轮融资,小象生活能否成为折扣界的“永辉”?

Log4j:error category option "1" not a decimal integer

VMware虚拟机IP,网关设置。虚拟机ping不通外网

Looking at the ups and downs of the mobile phone accessories market from the green Union's sprint for IPO

Can Xiaoxiang life become the "Yonghui" in the discount industry after the completion of the round a financing of tens of millions of yuan?
![[long time series prediction] aotoformer code detailed [3] model overall architecture analysis](/img/77/30215c363ae8a1324db1cbcaa5324b.png)
[long time series prediction] aotoformer code detailed [3] model overall architecture analysis

RS232/RS485转4G DTU 上传基于Modbus协议的温湿度传感器数据到远程TCP服务器

intXX_ T and int_ fastXX_ T what is the difference- What is the difference between intXX_ t and int_ fastXX_ t?
随机推荐
2022年熔化焊接与热切割操作证考试题库及答案
银行选择电子招标采购的必要性
多值映射:ArrayListMultimap和HashMultimap
B_QuRT_User_Guide(20)
msg=SolrCore ‘collection1‘ is not available due to init failure: Could not l
同一个用户的两次请求SessionId竟然不一致-----记录问题
OpenJudge NOI 1.13 17:文字排版
Can Xiaoxiang life become the "Yonghui" in the discount industry after the completion of the round a financing of tens of millions of yuan?
The Google search console webmaster tool cannot read the sitemap?
CPT 102_ LEC 16
Navicat premium 15 tool is automatically deleted by anti-virus protection software solution
Helm deploy traifik ingress
B_QuRT_User_Guide(17)
WordPress article directory plug-in luckywp table of contents setup tutorial
OpenJudge NOI 1.13 18:Tomorrow never knows?
How to add two factor authentication for WordPress websites
Minimum common ancestor of binary tree
怎样确保消息的可靠性投递?
弄懂了采矿业与碳中和的逻辑,就读懂了矿区无人驾驶的千亿市场
[new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community











