使用Sonarqube
构建项目时出现以下错误:
The following errors occurred during analysis:
Exception analyzing com.org.client.employee.EmployeeClient using detector com.h3xstream.findsecbugs.spring.SpringEntityLeakDetector
java.lang.NullPointerException
At com.h3xstream.findsecbugs.spring.SpringEntityLeakDetector.analyzeMethod(SpringEntityLeakDetector.java:107)
At com.h3xstream.findsecbugs.spring.SpringEntityLeakDetector.visitClassContext(SpringEntityLeakDetector.java:68)
At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1080)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:281)
At org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(FindbugsExecutor.java:235)
At java.util.concurrent.FutureTask.run(FutureTask.java:266)
At java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
At java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
At java.lang.Thread.run(Thread.java:748)
我正在尝试从声纳覆盖范围中排除client
目录,但看起来exclusion
无法正常工作:property "sonar.coverage.exclusions", "**/client/**"
以下是我使用的版本:SonarQube - 7.9
Gradle - 4.9
Spring Boot - 2.1.3
Java - Jdk8
最佳答案
关于spring - SonarQube分析问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63199954/