Open f-sys opened 7 years ago
I guess that you are experiencing the same issue as #8
The issue is that there is a dtd in the xml report for the coverage.
When using the docker image, you do not have access to internet, thus the xml file cannot be validated with the online dtd.
We added a property which should fix this:
sonar.coverage.dtdVerification=false
I've tried dtdVerification=false, it's ignored anyway.
Ok it's strange. I will try to reproduce the problem.
Hi, I'm sorry for the response time. I have just publish a pre-release (1.2.10-alpha) who add more debug information. Please re-try with -X arg for sonar-scanner and republish the log.
Having the same issue. Generating coverage.xml correctly and I do see the xml getting parsed in the command line but its not displaying in the sonarqube UI. @thibaultfalque
hi @sogajeffrey Do you publish your logs with -X args when you run sonar-scanner ? Do you use Docker ?
The logs will be long so you can publish them with https://gist.github.com/.
Thanks.
No we dont use -X. Yes we build in docker.
https://gist.github.com/sogajeffrey/fac8a714b4c2cf8b73bfa36240690654
Hi @sogajeffrey I can see in the logs this lines:
20:03:13.365 INFO: Analyse for /jenkins/workspace/Microservices_cf_feat-sonar-QZIR2FOAYBKOYLVBD2TADBEFYILYJ6ASH54XXAXXCOV5Q36NG5CA/coverage.xml
20:03:14.724 DEBUG: 918line coverage for file /go/src/github.build.ge.com/predix-devops/cf/cf.go
20:03:14.724 DEBUG: 285line coverage for file /go/src/github.build.ge.com/predix-devops/cf/user.go
20:03:14.725 WARN: unable to create InputFile object: /go/src/github.build.ge.com/predix-devops/cf/cf.go
So the coverage report is found but there is a problem with the file "cf.go". C an you verify if this file exist ?
@thibaultfalque Yes the file exists.
hi, Can I have the content of coverage file ? /jenkins/workspace/Microservices_cf_feat-sonar-QZIR2FOAYBKOYLVBD2TADBEFYILYJ6ASH54XXAXXCOV5Q36NG5CA/coverage.xml
Can you rerun with the new version 1.2.10-beta ? https://github.com/uartois/sonar-golang/releases/tag/v1.2.10-beta
sonar-scanner -X and post the logs
OK I understand why the file is not found but it's very strange.
In your coverage file the path is:
/Users/jeffreysu/workspace/go/src/github.build.ge.com/predix-devops/cf/cf.go
But when I get the path when parse the file I obtain:
/go/src/github.build.ge.com/predix-devops/cf/cf.go
@danielleberre any idea why this line return a bad value ?
@thibaultfalque I generated the coverage.xml on my local and posted it but the file that is parsed in the latest gist is from jenkins so the path is different
So jenkins use the local coverage ?
@thibaultfalque I generate the coverage at build time. I dont check the coverage report into the codebase.
Please test 1.2.10-gamma
@thibaultfalque https://gist.github.com/sogajeffrey/144e002a2c8af5322dc6169fa4bdbf3d No dice... still not working
@thibaultfalque this is my report.xml https://gist.github.com/sogajeffrey/d37567ec3ff08694b36774aa394a9f1c
@thibaultfalque Are we still unable to fix this?
It's fixed now for me
On Sat, Dec 2, 2017, 6:15 AM Daniel Le Berre notifications@github.com wrote:
@thibaultfalque https://github.com/thibaultfalque Are we still unable to fix this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uartois/sonar-golang/issues/14#issuecomment-348694820, or mute the thread https://github.com/notifications/unsubscribe-auth/AIa4AdKdQOJAuW1eSKHA5gjI2zNUAQqZks5s8VuQgaJpZM4N8h7s .
@f-sys could you check with the last release and close the issue if the problem is resolved ?
@f-sys could you check with the last release and close the issue if the problem is resolved ?
Description
When golang coverage is generated locally and sonar-scanner is launched locally it reports coverage measures to sonarqube. When it is launched in docker environment via Gitlab CI, it doesn't report coverage. Golang xml files are same, sonar-scanner scans vendor folder, but it is excluded.
Steps to Reproduce
Content of your sonar-project.properties
Log of sonar-scanner related to the plugin
Versions
SonarQube: 6.4 (build 25310) SonarQube Scanner: 3.0.3.778 sonar-golang: 1.2.8 Java: 1.8.0_51 Oracle Corporation (64-bit) Linux: 3.16.0-4-amd64 amd64
Additional Information
gitlab.kancelar.seznam.cz/Odpovidac/iris-firmy/handler/coverage.xml coverage.zip Succesfull local log: scanner.zip