Closed mrbacus closed 6 years ago
I've been having the same issue as well.
Hi, What is your version of plugin?
What is the --fast option ?
I was on the latest RC version (v1.2.11-rc5). Reverting to v1.2.10 fixed the problem for me.
I was using plugin 1.2.11-rc5 and switched to v1.2.10 - that resolved my issue. Thanks @juliencampion
@thibaultfalque , I am using --fast to only run "fast linters". Using that gets rid of the errors below which flood my screen. ... WARNING: deadline exceeded by linter vet on source/go/src/golang.org/x/net/dict (try increasing --deadline) WARNING: deadline exceeded by linter vet on source/go/src/golang.org/x/net/internal/socket (try increasing --deadline) WARNING: deadline exceeded by linter vet on source/go/src/golang.org/x/net/internal/nettest (try increasing --deadline) WARNING: deadline exceeded by linter vet on source/go/src/golang.org/x/net/internal/timeseries (try increasing --deadline)
@mrbacus and @juliencampion can you test the rc6 version ?
Using rc6 triggers a NullPointerException.
Here is the output log of sonar-scanner -X
:
I have fix the NullPointerException. Can you test the release rc7?
@thibaultfalque , rc7 is working for me. Thanks for the great support.
You're welcome @mrbacus ! Can you close the issue ?
I'm sorry, rc7 still causes problems for me. I will get back to this issue when I find out whether the content of the output log can be shared safely. ^^
Here is the full, unedited output of the command sonar-scanner -X
on the rc7 version.
The command ends with an UnsupportedOperationException.
Also, it seems that the plugin tries to interpret each line of the test files as function names, as evidenced by the warning lines.
Ok it's because this file "/home/jcampion/work/go/src/gitlab.com/HumanRevolt/hrserver/db/db_test.go" is added twice. But I don't understand why... I will try to find a solution as soon as possible.
@mrbacus I close this issue because the problem of @juliencampion is very different.
@juliencampion can you open an issue with your problem?
Thanks.
Description
Hello,
I just installed sonarqube (docker) and have not analyzed any projects. I am able to pull up sonarqube at localhost in my browser. I can run gometalinter to generate report.xml. I am not able to successfully run sonar-scanner (see logs below). I am hoping somebody might be able to point me at some missing configuration/settings I need to make.
Regards, James
Steps to Reproduce
Run the following two commands from root of project directory:
Content of your sonar-project.properties
sonar.projectKey=NearStoreAvailability sonar.projectName=Near Store Availability sonar.projectVersion=1.0 sonar.golint.reportPath=report.xml sonar.coverage.reportPath=coverage.xml sonar.coverage.dtdVerification=false sonar.test.reportPath=test.xml sonar.sources=./
Log of sonar-scanner related to the plugin
INFO: Scanner configuration file: /Users/x3aw/Downloads/sonar-scanner-3.0.3.778-macosx 3/conf/sonar-scanner.properties INFO: Project root configuration file: /Users/x3aw/source/go/src/git.nordstrom.net/cos/near-store-availability/sonar-project.properties INFO: SonarQube Scanner 3.0.3.778 INFO: Java 1.8.0_121 Oracle Corporation (64-bit) INFO: Mac OS X 10.11.6 x86_64 INFO: User cache: /Users/x3aw/.sonar/cache INFO: Publish mode INFO: Load global settings INFO: Load global settings (done) | time=85ms INFO: Server id: AV_0ecowXGmkGPLIqUHI INFO: User cache: /Users/x3aw/.sonar/cache INFO: Load plugins index INFO: Load plugins index (done) | time=50ms INFO: SonarQube server 6.7.0 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent) INFO: Process project properties INFO: Load project repositories INFO: Load project repositories (done) | time=18ms INFO: Load quality profiles INFO: Load quality profiles (done) | time=30ms INFO: Load active rules INFO: Load active rules (done) | time=1508ms INFO: Load metrics repository INFO: Load metrics repository (done) | time=80ms INFO: Project key: NearStoreAvailability INFO: ------------- Scan Near Store Availability INFO: Load server rules INFO: Load server rules (done) | time=717ms INFO: Base dir: /Users/x3aw/source/go/src/git.nordstrom.net/cos/near-store-availability INFO: Working dir: /Users/x3aw/source/go/src/git.nordstrom.net/cos/near-store-availability/.scannerwork INFO: Source paths: . INFO: Source encoding: UTF-8, default locale: en_US WARN: Property 'sonar.php.file.suffixes' is not declared as multi-values/property set but was read using 'getStringArray' method. The SonarQube plugin declaring this property should be updated. INFO: Index files INFO: 869 files indexed INFO: Quality profile for go: Golint Rules INFO: Quality profile for js: Sonar way INFO: Quality profile for xml: Sonar way INFO: Sensor SonarJavaXmlFileSensor [java] INFO: 1 source files to be analyzed INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=243ms INFO: 1/1 source files have been analyzed INFO: Sensor XML Sensor [xml] INFO: Sensor XML Sensor [xml] (done) | time=566ms INFO: Sensor GoMetaLinter issues loader sensor [golang] INFO: Parsing the file report.xml INFO: Parsing 'GoMetaLinter' Analysis Results INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 6.596s INFO: Final Memory: 51M/337M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution java.lang.IllegalArgumentException: expected one element but was: <Dockerfile, README.md, adapter/adapter.go, adapter/adapter_test.go, adapter/adapterfakes/fake_adapter.go, ...> at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:135) at fr.univartois.sonargo.core.rules.GoLintIssueLoaderSensor.getResourceAndSaveIssue(GoLintIssueLoaderSensor.java:144) at fr.univartois.sonargo.core.rules.GoLintIssueLoaderSensor.parseAndSaveResults(GoLintIssueLoaderSensor.java:137) at fr.univartois.sonargo.core.rules.GoLintIssueLoaderSensor.execute(GoLintIssueLoaderSensor.java:120) at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53) at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68) at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48) at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121) at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116) at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233) at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123) at org.sonarsource.scanner.cli.Main.execute(Main.java:77) at org.sonarsource.scanner.cli.Main.main(Main.java:61) ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Versions
Versions of your sonar installation (server, sonar-scanner), gometalinter, go and OS. server: 6.7.0.33306 sonar-scanner: 3.0.3.778-macosx 3 gometalinter: v1 go: 1.8.3 OS: Mac OS X 10.11.6 x86_64
Additional Information
-