Skip to content

Commit f968dd1

Browse files
committed
Fix detection of non-executable lines for reporting to Phabricator and notifying low coverage patches
Before f0a6558, we were parsing reports in the codecov/coveralls format, where None meant a non-executable lines. In the covdir format instead, a non-executable line is marked with -1. The regression went unnoticed because our tests were using the codecov/coveralls format and, instead of rewriting them to use the covdir format directly (which is harder to read for a human), we introduced a test utility function to convert them automatically, which had a bug (we did not convert None to -1). Fixes a regression from f0a6558
1 parent 5d0f864 commit f968dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/code_coverage_bot/phabricator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _apply_coverage_map(self, annotate, coverage_map):
108108
key = "{}-{}".format(orig_changeset, orig_line)
109109
if key in coverage_map:
110110
count = coverage_map[key]
111-
if count is None:
111+
if count == -1:
112112
# A non-executable line.
113113
phab_coverage_data += "N"
114114
elif count > 0:

0 commit comments

Comments
 (0)