Skip to content

Commit 2a40d9b

Browse files
committed
coverage: Properly ignore non-Rust files
1 parent 92403b4 commit 2a40d9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

misc/python/materialize/cli/ci_coverage_pr_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ def find_modified_lines() -> Coverage:
5050
line = line_raw.decode("utf-8")
5151
# +++ b/src/adapter/src/coord/command_handler.rs
5252
if line.startswith("+++"):
53+
file = line.removeprefix("+++ b/")
5354
if not line.endswith(".rs"):
5455
continue
55-
file = line.removeprefix("+++ b/")
5656
coverage[file] = OrderedDict()
5757
# @@ -641,7 +640,6 @@ impl Coordinator {
58-
elif line.startswith("@@ ") and file:
58+
elif line.startswith("@@ ") and file in coverage:
5959
# We only care about the second value ("+640,6" in the example),
6060
# which contains the line number and length of the modified block
6161
# in new code state.

0 commit comments

Comments
 (0)