1

Team, I am generating go coverage and converting them to html to view in Jenkins. but I want to ship the LCOV file .dat to sonarqube. is there a way? like set a key value in sonar-project.properties

./bazel $BAZEL_STARTUP_OPTS coverage $BAZEL_OPTS $BAZEL_EXTRA_OPTS //src/services/discovery/... \
    --combined_report=lcov \
    --test_output=errors --test_verbose_timeout_warnings | tee /tmp/test_results.txt

for view on Jenkins I am converting LCOV _coverage_report.dat to html. But what I want to know if I can specify this in sonarqube.properties file either html or .dat lcov? to pick it up after scanning is done? I see this for java but not for GO

./bazel run @lcov//:bin/genhtml -- -o \coverage/discovery --ignore-errors source --no-source --function-coverage --branch-coverage --no-sort bazel-out/_coverage/_coverage_report.dat || true
AhmFM
  • 1,552
  • 3
  • 23
  • 53
  • Am not sure and did not do any such so far. I would recommend you to refer this [implementation](https://github.com/Zetten/bazel-sonarqube) to analyse Bazel projects with SonarQube. – SG_Bazel Dec 14 '22 at 05:28

0 Answers0