tools
tools copied to clipboard
[coverage] Coverage v2
This is a collection of things I want to change in package:coverage v2.0.0. I'll add things as I think of them.
- Delete all deprecated flags/params/functions
- Simplify/unify the tools.
- Are there any use cases for keeping
collect_coverage,format_coverage, orrun_and_collect, or are all use cases covered bytest_with_coverage? - We should at least be able to merge
format_coverageinto the other tools.
- Are there any use cases for keeping
- There are several different ways of filtering coverage data by filename/package. Do we need all of them?
-
test_with_coverageruns the full workflow and only usescollect'sscopedOutput. - The formatters have two more filtering options:
reportOnandignoreGlobs. I don't know of any legit use cases for these.reportOndoes the same job asscopedOutput, andignoreGlobsis a bit of a hack that's probably better handled by// coverage:ignore-filecomments.
-
- Merge
collect'sresumeandwaitPausedflags. For all known use cases they're either both true or both false, and merging them would let us remove some edge cases. - Wrap the
Map<String, HitMap>type in a class (CoverageData?) -
collectshould returnCoverageData, rather than converting it to JSON.CoverageDatashould be the canonical representation. Conversion to JSON should be a separate step. - Change the ignoredLines variables from
List<List<int>>toList<Range> - Remove line ignoring from the json parser functions
- Actually, if we don't have a separate format tool, then we probably don't need the JSON parser
- Are there any use cases for the JSON format at all? Or does everyone just use lcov?