Skip to content

Commit

Permalink
coverage: Use exclamation mark to mark uncovered lines
Browse files Browse the repository at this point in the history
As suggested by Philip
  • Loading branch information
def- committed Apr 19, 2023
1 parent 2836f89 commit 142a1cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified doc/developer/assets/coverage-uncovered-lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/developer/code-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ As an example let's take the *[adapter: Update privileges when an owner is updat

![Commit: 69de84971e8c16ab459c88be73870bb676dbc478, Branch: jkosh44:update-privilege-owners](assets/coverage-new-build.png)

After some time your [Coverage run](https://buildkite.com/materialize/coverage/builds/26) will be finished and contain a summary of any uncovered lines in the form of a `git diff` where each removed line is not covered:
After some time your [Coverage run](https://buildkite.com/materialize/coverage/builds/26) will be finished and contain a summary of any uncovered lines in the form of a `git diff` where each line highlighted with a `!` is not covered:

![Uncovered Lines in Pull Request](assets/coverage-uncovered-lines.png)

Expand Down
4 changes: 3 additions & 1 deletion misc/python/materialize/cli/ci_coverage_pr_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ def get_report(coverage: Coverage) -> str:
f.write(line)
f.truncate()

result = subprocess.run(["git", "diff"], check=True, capture_output=True)
result = subprocess.run(
["git", "diff", "--output-indicator-old=!"], check=True, capture_output=True
)
return result.stdout.decode("utf-8").strip()
finally:
# Restore the code into its original state
Expand Down

0 comments on commit 142a1cc

Please sign in to comment.