Now that --fail-under-lines works, my only remaining pain point with cargo llvm-cov is that the iteration cycle (when writing tests for uncovered code) is a bit complex, compared to other coverage tools I saw before. The text output is nice, but it even shows covered lines, so it's very verbose. The command-line output is the other extreme: it's just a summary, it doesn't show you exactly what lines are uncovered.
E.g. Python's coverage.py has a simple way to just point out the uncovered lines, one line / filename, like this:
foo.py: 12, 22
bar.py: 32, 42
coverage.py calls this option --show-missing. I think that's a nice middle ground that is sometimes useful to people.
Would you accept a patch to add a --show-missing-lines (or similarly named) optional bool switch that would print such info at the end?
I expect doing such analysis based on the llvm-cov json output is not too hard (when limited to line coverage), we just would need to detect lines which have matching segments but all of them are the "could have a count, but doesn't" case.
Now that
--fail-under-lines
works, my only remaining pain point withcargo llvm-cov
is that the iteration cycle (when writing tests for uncovered code) is a bit complex, compared to other coverage tools I saw before. The text output is nice, but it even shows covered lines, so it's very verbose. The command-line output is the other extreme: it's just a summary, it doesn't show you exactly what lines are uncovered.E.g. Python's coverage.py has a simple way to just point out the uncovered lines, one line / filename, like this:
coverage.py calls this option
--show-missing
. I think that's a nice middle ground that is sometimes useful to people.Would you accept a patch to add a
--show-missing-lines
(or similarly named) optional bool switch that would print such info at the end?I expect doing such analysis based on the
llvm-cov
json output is not too hard (when limited to line coverage), we just would need to detect lines which have matching segments but all of them are the "could have a count, but doesn't" case.