Closed JkCheung closed 2 years ago
第一个问题: 指定了一个项目名称前缀开始的考虑是想着不要覆盖其他途径下触发的sonar检查,例如你的团队在CI中触发的代码检查。原先也有考虑过不将插件检查的结果上传到SonarQube上,不过现在会将本地检查结果上传到SonarQube。
第二个问题: 麻烦你提供下使用的IDE版本,SonarQube版本和大概配置的规则情况。
@JkCheung 原先的错误日志未输出cause,导致无法定位错误源头。你先尝试卸载一次插件,然后重新安装一次插件,看下是否可以解决问题。
提交sonar报告带有 插件前缀
解析报告空指针
INFO: ------------- Run sensors on project INFO: Sensor Zero Coverage Sensor INFO: Sensor Zero Coverage Sensor (done) | time=48ms INFO: Sensor Java CPD Block Indexer INFO: Sensor Java CPD Block Indexer (done) | time=203ms INFO: CPD Executor 63 files had no CPD blocks INFO: CPD Executor Calculating CPD for 121 files INFO: CPD Executor CPD calculation finished (done) | time=64ms INFO: 开始复制报告 INFO: 报告复制成功 INFO: 开始解析报告 ERROR: 报告解析出错, java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.yujunyang.intellij.plugin.sonar.core.LogOutputImpl.log(LogOutputImpl.java:81) at org.sonarsource.scanner.api.EmbeddedScanner.lambda$doExecute$0(EmbeddedScanner.java:189) at org.sonarsource.scanner.api.internal.batch.DefaultBatchFactory.lambda$createBatch$0(DefaultBatchFactory.java:36) at org.sonar.batch.bootstrapper.LogCallbackAppender.append(LogCallbackAppender.java:41) at org.sonar.batch.bootstrapper.LogCallbackAppender.append(LogCallbackAppender.java:27) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:414) at ch.qos.logback.classic.Logger.info(Logger.java:587) at org.sonar.api.utils.log.LogbackLogger.doInfo(LogbackLogger.java:100) at org.sonar.api.utils.log.BaseLogger.info(BaseLogger.java:88) at org.sonar.scanner.report.ReportPublisher.generateReportFile(ReportPublisher.java:166) at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:137) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:366) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:566) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy231.execute(null:-1) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) at com.yujunyang.intellij.plugin.sonar.core.EmbeddedScannerHelper.startEmbeddedScanner(EmbeddedScannerHelper.java:69) at com.yujunyang.intellij.plugin.sonar.core.SonarScannerStarter.asyncStartImpl(SonarScannerStarter.java:238) at com.yujunyang.intellij.plugin.sonar.core.SonarScannerStarter.asyncStart(SonarScannerStarter.java:216) at com.yujunyang.intellij.plugin.sonar.core.SonarScannerStarter.access$000(SonarScannerStarter.java:53) at com.yujunyang.intellij.plugin.sonar.core.SonarScannerStarter$2.run(SonarScannerStarter.java:197) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:450) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:117) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:510) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:243) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:243) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.security.AccessController.doPrivileged(AccessController.java:-2) at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.lang.Thread.run(Thread.java:829) INFO: Analysis report generated in 163ms, dir size=2 MB INFO: Analysis report compressed in 680ms, zip size=856 KB INFO: Analysis report uploaded in 4519ms INFO: ANALYSIS SUCCESSFUL, you can browse http://xxxxxxxxx/dashboard?id=com.yujunyang.intellij.plugin.sonar%3Axxxxxx INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report INFO: More about the report processing at http://xxxxxxxxxx/api/ce/task?id=AXwrPhxi3gUExxxxxxxx INFO: Analysis total time: 1:29.543 s