From 2a0cd2e4812739a4f4b5e48d01dae50f07c6b730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E4=BC=9F=E7=A8=8B?= <1724478130@qq.com> Date: Wed, 7 Sep 2022 00:04:43 +0800 Subject: [PATCH] sonar --- .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 ++++++ sonar-project.properties | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .scannerwork/.sonar_lock create mode 100644 .scannerwork/report-task.txt create mode 100644 sonar-project.properties diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 0000000..e69de29 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 0000000..a7e4e29 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=sonar1 +serverUrl=http://localhost:9000 +serverVersion=9.5.0.56709 +dashboardUrl=http://localhost:9000/dashboard?id=sonar1 +ceTaskId=AYMTgyVd0ZNvsugztfUv +ceTaskUrl=http://localhost:9000/api/ce/task?id=AYMTgyVd0ZNvsugztfUv diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..7370485 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,17 @@ +# 配置代码扫描的项目信息,每个项目有唯一的key,可以自己定 +# must be unique in a given SonarQube instance +sonar.projectKey=sonar1 + +# this is the name displayed in the SonarQube UI +# 名称自己定 +sonar.projectName=sonar1 +sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +# If not set, SonarQube starts looking for source code from the directory containing +# 配置扫描的代码目录,目录一般就是项目根目录下的src文件夹 +sonar.sources=src + +# classes文件目录,不加会报错。在代码根目录添加target文件夹(我的根目录为: E:\git\kang_wei\src) +# 如果还是报错在target中添加classes文件夹,之后下列等号右边改为target/classes +sonar.java.binaries=target \ No newline at end of file