From a code review prospective, we've found it valuable to have information about the lines of code that are edited (I refer to this here as "new"). I produce a table like this on PRs:
|
b79d3c |
#18890 d0b30f |
|
Total |
Total |
+/- |
New |
| Rate |
81.56% |
81.56% |
+0.01% |
100.00% |
| Hits |
69452 |
69480 |
+28 |
29 |
| Misses |
15706 |
15707 |
+1 |
0 |
Where the new line coverage is generated with something like this:
differ = CoberturaDiff(base_cobertura, head_cobertura)
summary = {'hits': 0, 'misses': 0}
for file in differ.files():
for line in differ.file_source(file):
if line.status is not None and line.reason == 'line-edit':
hits_misses_key = 'hits' if line.status else 'misses'
summary[hits_misses_key] += 1
I'm curious if this has any place here instead - maybe at the very least as a helper that will produce something as such? I don't mind keeping this in our local generation, but the peace of mind of having it tested here instead is nice.
EDIT: maybe this has a better place in Discussions to get that kicked off?
From a code review prospective, we've found it valuable to have information about the lines of code that are edited (I refer to this here as "new"). I produce a table like this on PRs:
Where the new line coverage is generated with something like this:
I'm curious if this has any place here instead - maybe at the very least as a helper that will produce something as such? I don't mind keeping this in our local generation, but the peace of mind of having it tested here instead is nice.
EDIT: maybe this has a better place in Discussions to get that kicked off?