SonarQube代码质量管理平台配置

jdk11

SonarQube数据库配置(版本8.7.1)

#----- PostgreSQL 9.3 or greater

# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".
sonar.jdbc.url=jdbc:postgresql://localhost/sonar?currentSchema=public
sonar.login=#sonar网页登录名
sonar.password=#sonar网页登录密码
sonar.jdbc.username=#数据库登录名
sonar.jdbc.password=#数据库登录密码

 

SonarQube网页配置(版本8.7.1

 # By default, ports will be used on all IP addresses associated with the server.


sonar.web.host=localhost
# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).

#sonar.web.context=

# TCP port for incoming HTTP connections. Default value is 9000.

sonar.web.port=9000

 

Sonar-scanner配置(版本4.6.0

#----- Default SonarQube server

sonar.host.url=http://localhost:9000
sonar.login=#网页登录名
sonar.password=#网页登录密码
sonar.jdbc.url=jdbc:postgresql://localhost/sonar?currentSchema=public
sonar.jdbc.username=#数据库登录名
sonar.jdbc.password=#数据库登录密码
#----- Default source code
encoding

sonar.sourceEncoding=UTF-8

 

git获取项目代码后新增配置项

# Required metadata
sonar.projectKey=watchman
#项目名称
sonar.projectName=watchman
#项目版本
sonar.projectVersion=1.0.1
# Comma-separated paths to directories with sources (required)
#扫面资源路径
sonar.sources=D:/Security-center/watchman
#sonarqube地址
sonar.host.url=http://localhost:9000
sonar.java.binaries=D:/Security-center/watchman
#项目语言
# Language
sonar.java.source=C:/Program Files/Java/jdk-11.0.6
sonar.language=java
#编码格式
# Encoding of the source files
sonar.sourceEncoding=UTF-8
sonar.exclusions=**/*.js

posted on 2021-08-02 10:44  oppen  阅读(244)  评论(0)    收藏  举报