Ich verwende Sonar-Check-Plugin-2.5-SNAPSHOT ich ein Qualitätsprofil erstellt Called Check und aktiviert alle Regeln, Ausführung wird jedes Mal, wenn es Bühne Check kommt. Ich habe versucht, dies erneut auszuführen, indem ich nur eine Regel aus dem checkstyle-Repository verwende, in der Annahme, dass es eine Regel ist, die das tut. aber das hat auch nicht funktioniert. Nur die Zeitausführung war erfolgreich, wenn keine Regeln aktiviert waren.Sonar-check Plugin wird nicht wie erwartet funktioniert
Ich bin neu in Sonarqube und brauche dringend Hilfe.
hier ist das Protokoll meiner Ausführung:
D:\SONAR_QUBE\sonar-scanner-2.5.1\bin\..
INFO: Scanner configuration file: D:\SONAR_QUBE\sonar-scanner-2.5.1\bin\..\conf\sonar-runner.properties
INFO: Project configuration file: D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\sonar-project.properties
INFO: SonarQube Scanner 2.5.1
INFO: Java 1.8.0_73 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: C:\Users\IC020829\.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=184ms
INFO: User cache: C:\Users\IC020829\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=10ms
INFO: SonarQube server 5.3
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=27ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Apply project exclusions
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=50ms
INFO: Load active rules
INFO: Load active rules (done) | time=1825ms
INFO: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
INFO: Publish mode
INFO: ------------- Scan Ashu_Test_Project
INFO: Language is forced to java
INFO: Load server rules
INFO: Load server rules (done) | time=1055ms
INFO: Base dir: D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple
INFO: Working dir: D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\.sonar
INFO: Source paths: src
INFO: Source encoding: windows-1252, default locale: en_US
INFO: Index files
INFO: 2 files indexed
INFO: Quality profile for java: CheckStyle
INFO: JaCoCoSensor: JaCoCo report not found : D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\target\jacoco.exec
INFO: JaCoCoItSensor: JaCoCo IT report not found: D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\target\jacoco-it.exec
INFO: Sensor JavaSquidSensor
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization...
INFO: Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property
INFO: JavaClasspath initialization done: 0 ms
INFO: JavaTestClasspath initialization...
INFO: Bytecode of dependencies was not provided for analysis of test files, you might end up with less precise results. Bytecode can be provided using sonar.java.test.libraries property
INFO: JavaTestClasspath initialization done: 0 ms
INFO: Java Main Files AST scan...
INFO: 2 source files to be analyzed
INFO: Java Main Files AST scan done: 1592 ms
INFO: Java bytecode has not been made available to the analyzer. The org.sonar.java.bytecode.visitor.DependenciesVisitor[email protected] are disabled.
INFO: Java Test Files AST scan...
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan done: 0 ms
INFO: Sensor JavaSquidSensor (done) | time=2574ms
INFO: Sensor Lines Sensor
INFO: 2/2 source files have been analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor Lines Sensor (done) | time=2ms
INFO: Sensor QProfileSensor
INFO: Sensor QProfileSensor (done) | time=61ms
INFO: Sensor SurefireSensor
INFO: parsing D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\target\surefire-reports
INFO: Sensor SurefireSensor (done) | time=0ms
INFO: Sensor SmellMeasuresSensor
INFO: Sensor SmellMeasuresSensor (done) | time=149ms
INFO: Sensor CheckstyleSensor
INFO: Execute Checkstyle 6.12.1...
INFO: Checkstyle configuration: D:\Ashu\sonar-examples-master\projects\languages\java\sonar-runner\java-sonar-runner-simple\.sonar\checkstyle.xml
INFO: Checkstyle charset: windows-1252
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V
at com.puppycrawl.tools.checkstyle.PackageNamesLoader.getPackageNames(PackageNamesLoader.java:156)
at com.puppycrawl.tools.checkstyle.Checker.finishLocalSetup(Checker.java:137)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:134)
at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:84)
at org.sonar.plugins.checkstyle.CheckstyleSensor.analyse(CheckstyleSensor.java:57)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:243)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:238)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:228)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:133)
at org.sonarsource.scanner.cli.Main.execute(Main.java:82)
at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Sie sollten das Checkstyle-Team über das Problem benachrichtigen. Inzwischen empfehle ich, die neueste Version zu verwenden. –