Team,
I have two sources files in a directory and one sourcefile has is completely skipped from being included in bazel-out/_coverage/_coverage_report.dat
and i have no clue so far. I looked up online.
when I uploaded the same coverage to sonarqube it shows coverage percentage less and local bazel after doing genhtml shows higher percentage because it ignored the source file with no coverage at all and just used the percentage from covered file. so is there a flag that i need to specify to bazel stating even if file has no tests, include it in coverage report such that coverage% is average of all files and not just files with tests? because it is giving a false positive at folder level when a folder has two files one with coverage and one with nothing bazel shows 100% for folder instead of average accounting lines from both files in same folder.
my command is below. am i missing any flag ?
./bazel coverage --config=gocov //src/servicescode/... --combined_report=lcov
coverage:gocov --combined_report=lcov --coverage_report_generator="//src/code/gocoverage-lcov:gocoverage-lcov"
INFO: LCOV coverage report is located at /private/var/tmp/_bazel_....bazel-out/_coverage/_coverage_report.dat
and execpath is bazel-out/_coverage/_coverage_report.dat
when i do below it generates html and it shows higher percentage because it did not include files with no coverage.
./bazel run @lcov//:bin/genhtml -- -o $HOME/waste/ --ignore-errors source --function-coverage --branch-coverage --no-sort bazel-out/_coverage/_coverage_report.dat