Closed pcaneill closed 6 years ago
Hi Thanks you for your feedback. It a known problem for example this issue #14. I try to resolve the problem.
Is ths the same problem?
I install the plugin v1.2.11-rc7, but only Golint profile found in SonarQube, no coverage function available.
Hum, it is strange that the RC breaks that functionality. It must be different from #14.
@pcaneill from your logs, it looks like your coverage.xml file lies in shell/coverage.xml, not in src/cover. Could you check?
Today I realized that we have the same issue. Noteworthy elements in the log include:
https://gist.github.com/pcaneill/378e3e15f67a4f103b68748742fbb096#file-gistfile1-txt-L555
https://gist.github.com/pcaneill/378e3e15f67a4f103b68748742fbb096#file-gistfile1-txt-L2442
It seems sonar-golang is looking for a go file which is named after the folder the tests sit in (in above case - the folder name is both src
, and so sonar-golang it is looking for src_test.go
)?
I get the same errors. I have a folder soap
with multiple go files in it, all of which reside in the importer
package. Executing the script as mentioned in the readme I get a coverage.xml
inside the soap
folder. Executing the sonar-scanner, I then get multiple messages saying:
WARN: name-of-test not found in expected test file named soap_test.go
Small addition. I tested the maintenance branch, and the problem seems gone on my side. @pcaneill might be worth to wait for the next RC.
@pcaneill I cloned the project https://github.com/junegunn/fzf and tested it but I can't manage to reproduce the problem: I have the coverage in sonarqube dashboard. Could you test it again with the last release ?
Hello, I am in vacation now. I will try to do it next week.
On Jan 4, 2018 23:27, "thibaultfalque" notifications@github.com wrote:
@pcaneill https://github.com/pcaneill I cloned the project https://github.com/junegunn/fzf and tested it but I can't manage to reproduce the problem: I have the coverage in sonarqube dashboard. Could you test it again with the last release ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uartois/sonar-golang/issues/45#issuecomment-355417100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJNSzeqd3WY-qDNbHbDz3yYwtfUwsfLks5tHVBSgaJpZM4RB0SB .
@pcaneill could you check with the last release and close the issue if the problem is resolved ?
@pcaneill could you close the issue if the problem is resolved ?
It appears to work on master
Description
I no longer have coverage information with the latest pre release v1.2.11-rc7 It works with latest release
Steps to Reproduce
I test sonarqube on this repository https://github.com/junegunn/fzf
Content of your sonar-project.properties
sonar.projectKey=gotest
sonar.projectName=name of project
sonar.projectVersion=1.0
sonar.golint.reportPath=report.xml
sonar.coverage.reportPath=src/coverage.xml
sonar.coverage.dtdVerification=false
sonar.test.reportPath=test.xml
sonar.sources=./
sonar.exclusions="vendor"
Log of sonar-scanner related to the plugin
https://gist.github.com/pcaneill/378e3e15f67a4f103b68748742fbb096
Versions
latest docker sonarcube version go 1.9
Additional Information
https://gist.github.com/pcaneill/378e3e15f67a4f103b68748742fbb096