uartois / sonar-golang

Sonarqube plugin for the golang language.
GNU Lesser General Public License v3.0
245 stars 32 forks source link

Getting Warnings on Importing Unknown Linting Errors #12

Closed dthagard closed 6 years ago

dthagard commented 7 years ago

Description

When running the sonar-golang plugin and importing the report.xml created by gometalinter using the ineffassign and gas linters, I receive the following warnings in the output:

WARN: This description "ineffectual assignment to err" is not usable
WARN: The key for the message ineffectual assignment to err is null, issue not saved
WARN: This description "file is not goimported" is not usable
WARN: The key for the message file is not goimported is null, issue not saved
WARN: This description "Errors unhandled.,LOW,HIGH" is not usable
WARN: The key for the message Errors unhandled.,LOW,HIGH is null, issue not saved
WARN: This description "Errors unhandled.,LOW,HIGH" is not usable
WARN: The key for the message Errors unhandled.,LOW,HIGH is null, issue not saved
WARN: This description "Errors unhandled.,LOW,HIGH" is not usable
WARN: The key for the message Errors unhandled.,LOW,HIGH is null, issue not saved
WARN: This description "Errors unhandled.,LOW,HIGH" is not usable
WARN: The key for the message Errors unhandled.,LOW,HIGH is null, issue not saved

Steps to Reproduce

  1. Create a golang based project that creates warnings when running the ineffassign and/or gas linters.
  2. Run gometalinter with the ineffassign and gas linters enabled in the gometalinter.json and set the output to export to report.xml
  3. Run the sonar-scanner while importing the report.xml output from gometalinter.
  4. Profit.

Content of your sonar-project.properties

sonar.host.url=https://sonarqube<REDACTED>
sonar.sourceEncoding=UTF-8
sonar.bitbucket.buildStatusEnabled=false
sonar.bitbucket.teamName=<REDACTED>
sonar.bitbucket.accountName=<REDACTED>
sonar.bitbucket.repoSlug=<REDACTED>
sonar.bitbucket.branchName=<REDACTED>
sonar.projectKey=<REDACTED>
sonar.sources="functions/pipelines_ecr_credentials/"
sonar.analysis.mode=issues
sonar.exclusions="vendor"
sonar.bitbucket.oauthClientKey=<REDACTED>
sonar.bitbucket.oauthClientSecret=<REDACTED>
sonar.login=<REDACTED>
sonar.password=<REDACTED>
sonar.projectVersion=<REDACTED>
sonar.language=go

Log of sonar-scanner related to the plugin

Not provided.

Versions

INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Linux 4.9.24-coreos amd64
...
INFO: Download sonar-python-plugin-1.8.0.1496.jar
INFO: Download sonar-css-plugin-3.1.jar
INFO: Download qualinsight-sonarqube-smell-plugin-4.0.0.jar
INFO: Download sonar-auth-googleoauth-plugin-1.6.1.jar
INFO: Download sonar-golang-plugin-1.2.7.jar
INFO: Download sonar-bitbucket-plugin-1.2.0.jar
INFO: Download sonar-sonargraph-plugin-3.5.jar
INFO: Download sonar-javascript-plugin-3.0.0.4962.jar
INFO: Download sonar-java-plugin-4.10.0.10260.jar
INFO: Download sonar-web-plugin-2.5.0.476.jar
INFO: Download sonar-scm-git-plugin-1.2.jar
INFO: Download sonar-rci-plugin-1.0.1.jar
INFO: Download checkstyle-sonar-plugin-3.7.jar
INFO: Download cks-slack-notifier-2.0.jar
INFO: SonarQube server 6.4.0

Additional Information

report.xml.txt

danielleberre commented 7 years ago

Thanks for reporting the missing support for those violations, and thanks for the PR.

We add support for violations ASA we meet them, because there is no easy way to get a list of all GoMetaLinter violations.

danielleberre commented 7 years ago

@thibaultfalque @dthagard should that issue remain open? Trying to clean up a bit the issues :)

thibaultfalque commented 6 years ago

@dthagard could you check with the last release and close the issue if the problem is resolved ?

thibaultfalque commented 6 years ago

@dthagard could you check with the last release and close the issue if the problem is resolved ?

dthagard commented 6 years ago

I’ve not had a chance to test. We can close this issue out for now, and I’ll reopen if and when I see the error again.