Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
YiRanCN committed Dec 3, 2024
1 parent 5a28f94 commit ecceb23
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions docs/study/back/代码质量检查.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@

### sonar

```xml
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.username>xxx</sonar.jdbc.username>
<sonar.jdbc.password>xxx</sonar.jdbc.password>
<sonar.host.url>http://10.0.5.127:9000</sonar.host.url>
<sonar.projectKey>${project.artifactId}</sonar.projectKey>
<sonar.projectName>${project.artifactId}</sonar.projectName>
</properties>
</profile>
</profiles>
```

- 必需只用jdk11,否则报错JAVA编译版本的问题
- sonarweb地址上必需有这个项目,可以新建,注意名字要一样
- 先idea去install到本地
- mvn sonar:sonar 执行
- sonarweb地址上必需有这个项目
- 先idea去install到本地
- 确保上面的pom.xml里面的activeByDefault=true
- 在sonarweb地址可以下载pdf报告

0 comments on commit ecceb23

Please sign in to comment.