Skip to content

Commit a81418e

Browse files
committed
exclude bindings definition from coverage report, it's glue code, not application logic
1 parent b23f68d commit a81418e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ jobs:
119119
run: |
120120
cd build
121121
lcov --keep-going --ignore-errors mismatch --directory . --capture --output-file coverage.info
122-
lcov --ignore-errors mismatch --remove coverage.info '*/test/*' -o coverage.info
123-
gcovr --root .. -e '../test' -e '../examples' --sonarqube -o coverage.xml --exclude-throw-branches \
122+
lcov --ignore-errors mismatch --remove coverage.info '*/test/*' '*/bindings/*' -o coverage.info
123+
gcovr --root .. -e '../test' -e '../examples' -e '../src/bindings' --sonarqube -o coverage.xml --exclude-throw-branches \
124124
--gcov-ignore-parse-errors --exclude-unreachable-branches
125125
# Strip branch attributes so SonarQube uses line coverage only
126126
# (gcovr's sonarqube format includes branch data that penalizes macro-generated conditionals like XBT_DEBUG)

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sonar.links.scm=https://github.com/simgrid/DTLMod/
1010
# Comma-separated paths to directories with sources (required)
1111
sonar.sources=src,include
1212
sonar.tests=test
13-
sonar.coverage.exclusions=test/** # do not consider test directory for coverage
13+
sonar.coverage.exclusions=test/**,src/bindings/** # do not consider test directory and Python bindings glue for coverage
1414

1515
sonar.cfamily.reportingCppStandardOverride=c++17
1616

0 commit comments

Comments
 (0)