提交 bf32e2e7 编写于 作者: 如梦技术's avatar 如梦技术 🐛

切换到 sonar cloud。

上级 c38719a2
......@@ -14,7 +14,9 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build sonarqube
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
buildOnJava11:
name: build on java11
runs-on: ubuntu-latest
......
plugins {
id "org.sonarqube" version "3.0"
}
ext {
javaVersion = JavaVersion.VERSION_1_8
springBootVersion = "2.3.2.RELEASE"
......@@ -69,6 +73,10 @@ configure(subprojects - project(":mica-bom")) {
compileJava.dependsOn(processResources)
}
def getSonarToken() {
return System.getenv('SONAR_TOKEN') ?: SONAR_TOKEN
}
def getRepositoryUsername() {
return System.getenv('NEXUS_OSS_USER_NAME') ?: NEXUS_OSS_USER_NAME
}
......
VERSION=2.0.5-SNAPSHOT
GROUPID=net.dreamlu
SONAR_TOKEN=***
NEXUS_OSS_USER_NAME=***
NEXUS_OSS_PASS_WORD=***
......
// TODO L.cm spotbugs 目前不能输出 html,跟 lombok 插件有冲突
apply plugin: "findbugs"
findbugs {
toolVersion = '3.0.1'
findbugsTest.enabled = false
sourceSets = [sourceSets.main]
ignoreFailures = true
reportsDir = file("$project.buildDir/findbugsReports")
effort = "max"
showProgress = true
reportLevel = "high"
excludeFilter = file("$rootProject.projectDir/gradle/quality/findbugs/excludeFilter.xml")
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
sonarqube {
properties {
property "sonar.projectKey", "lets-mica_mica-example"
property "sonar.organization", "lets-mica"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", getSonarToken()
}
}
<FindBugsFilter>
<!--
Allow a class to hold or return mutable objects. While this has obvious risks, it is much too
common a pattern to treat as a bug.
-->
<Match>
<Bug code="EI, EI2"/>
</Match>
<!-- Ignore "UrF: Unread public/protected field (URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD)" since it is mostly false positives -->
<Match>
<Bug code="UrF" />
</Match>
<!-- Ignore "NM_SAME_SIMPLE_NAME_AS_SUPERCLASS: shadows the simple name of the superclass" -->
<!--<Match>-->
<!--<Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />-->
<!--</Match>-->
<!--&lt;!&ndash; Ignore "NM_SAME_SIMPLE_NAME_AS_INTERFACE: shadows the simple name of implemented interface" &ndash;&gt;-->
<!--<Match>-->
<!--<Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />-->
<!--</Match>-->
<Match>
<Class name="~net\.dreamlu\.mica\.config\.SpringUtils.*" />
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
</Match>
<Match>
<Class name="~net\.dreamlu\.mica\.log\.LogPrintStream.*" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>
</FindBugsFilter>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册