CentOS6.8配置SonarQube Scanner配合SonarQube使用
2024-10-12 04:35:34
下载最新的SonarQube Scanner压缩包
1 解压缩到CentOs目录下 我的是 /usr/local/software/sonar-scanner-3.0.3.778-linux
2 <install_directory>/conf/sonar-scanner.properties: 修改对应配置文件
根据具体的你的URL 如果配置了sonar的context端口后还需要加上Context路径
#----- Default SonarQube server
#sonar.host.url=http://localhost:9000
3 Add the <install_directory>/bin directory to your path. 加入到环境变量
执行sonar-scanner命令出现下面表示安装成功
usage: sonar-scanner [options]
Options:
-D,--define <arg> Define property
-h,--help Display help information
-v,--version Display version information
-X,--debug Produce execution debug output
4 使用sonar scanner 在项目根目录下创建sonar-project.properties文件
Create a configuration file in the root directory of the project: sonar-project.properties
sonar-project.properties
关键配置 projectName 项目名 sources源代码目录
# must be unique in a given SonarQube instance
sonar.projectKey=my:project
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=My project
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
|
5 在sonar-project.properties所在目录 也就是 项目根目录 执行sonar-scanner就可以扫描了
6 如果没有问题 就可以再sonar的web界面看到扫描结果了
SonarQube的配置详见 http://www.cnblogs.com/QuestionsZhang/p/7115116.html
最新文章
- Strus2学习记录整理【持续更新】
- python实验二:字符串排序
- HDU 2689Sort it 树状数组 逆序对
- 【Coding地址汇总】2016年沈航软工学生项目主页
- MEF 编程指南(六):导出和元数据
- Cassandra1.2文档学习(16)—— 模式的变化
- ruby gems安装镜像
- C#实现文件批量重命名源码下载
- 基于python的tagcloud
- js打印保存用户输入的内容
- SQL注入攻击[详解]
- 二分查找的变种(Java实现)
- 关于React Native项目在android上UI性能调试实践
- QT5版本添加icon图标步骤
- C# signtool error:no certificates were found that met all the given criteria 错误解决方案
- python: 序列化/反序列化及对象的深拷贝/浅拷贝
- html5 canvas画布上合成
- SSH-运行main函数,一直报空指针,调依赖注入配置的dao
- 计数排序与桶排序(bucket sort)
- C#异步编程的一些认识
热门文章
- python之文件系统操作(os模块)
- /include/caffe/common.cuh(9): error: function ";atomicAdd(double *, double)"; has already been defined
- AtCoder WTF 2019 C2. Triangular Lamps Hard
- map内置函数分析所得到的思路
- BZOJ3750[POI2015]Pieczęć——链表
- C# == 和 Equals
- 【 HDU1081 】 To The Max (最大子矩阵和)
- Azure Powershell script检测登陆并部署ARM Template
- Codeforces Round #510 (Div. 2)(B)
- PHP自动加载(__autoload和spl_autoload_register)