Skip to content

[coverage] Coverage v2 #2126

Open
Open
@liamappelbe

Description

@liamappelbe

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, or run_and_collect, or are all use cases covered by test_with_coverage?
    • We should at least be able to merge format_coverage into the other tools.
  • There are several different ways of filtering coverage data by filename/package. Do we need all of them?
    • test_with_coverage runs the full workflow and only uses collect's scopedOutput.
    • The formatters have two more filtering options: reportOn and ignoreGlobs. I don't know of any legit use cases for these. reportOn does the same job as scopedOutput, and ignoreGlobs is a bit of a hack that's probably better handled by // coverage:ignore-file comments.
  • Merge collect's resume and waitPaused flags. 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?)
  • collect should return CoverageData, rather than converting it to JSON. CoverageData should be the canonical representation. Conversion to JSON should be a separate step.
  • Change the ignoredLines variables from List<List<int>> to List<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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions