dtebrq0245 2015-06-02 20:40
浏览 172

将Go来源和覆盖范围导入SonarQube

I have a Go project that I would like to import into SonarQube 5.1, using SonarRunner.

I know it's not one of SonarQube's supported languages so I have set the property

sonar.import_unknown_files=true

to accomplish some basic level of import - and it does the job. The project also has code coverage in Cobertura format, generated using https://github.com/axw/gocov/ and https://github.com/AlekSi/gocov-xml.

I have not been successful in getting this XML to import with settings:

sonar.core.codeCoveragePlugin=cobertura
sonar.cobertura.reportPath=coverage.xml

Hence the project appears as a gray box on the Sonar dashboard. Has anyone done something similar and got it working? Is it because Go is an unsupported language?

Many thanks!

Andy

  • 写回答

2条回答 默认 最新

  • duanlu0559 2015-06-03 06:32
    关注

    Yes, to my knowledge the SonarQube Cobertura plugin only allows to import coverage reports for Java (and maybe supported JVM based languages).

    However, if you are willing to do some transformation on your coverage result file, the Generic Test Coverage plugin might suit your needs.

    评论

报告相同问题?