Skip to content

Commit 62d12e4

Browse files
iluuu1994Ayesh
authored andcommitted
Enable gcovr --exclude-unreachable-branches and --exclude-throw-branches flags
These are mostly useful for C++ code, i.e. ext-intl. See: https://gcovr.com/en/stable/faq.html#why-does-c-code-have-so-many-uncovered-branches Closes phpGH-21655
1 parent 9e15775 commit 62d12e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/Makefile.gcov

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ gcovr-html:
5656
@echo "Generating gcovr HTML"
5757
@rm -rf gcovr_html/
5858
@mkdir gcovr_html
59-
gcovr -sr . -o gcovr_html/index.html --html --html-details \
59+
gcovr -sr . -o gcovr_html/index.html --html --html-details --exclude-unreachable-branches --exclude-throw-branches \
6060
$(foreach pattern, $(GCOVR_EXCLUDE_LINES_BY_PATTERNS), --exclude-lines-by-pattern $(pattern)) \
6161
$(foreach lib, $(GCOVR_EXCLUDES), -e $(lib))
6262

6363
gcovr-xml:
6464
@echo "Generating gcovr XML"
6565
@rm -f gcovr.xml
66-
gcovr -sr . -o gcovr.xml --xml \
66+
gcovr -sr . -o gcovr.xml --xml --exclude-unreachable-branches --exclude-throw-branches \
6767
$(foreach pattern, $(GCOVR_EXCLUDE_LINES_BY_PATTERNS), --exclude-lines-by-pattern $(pattern)) \
6868
$(foreach lib, $(GCOVR_EXCLUDES), -e $(lib))
6969

0 commit comments

Comments
 (0)