Skip to content

Add CLI support for coverage thresholds #43

@matm

Description

@matm

Rationale

Would allow to only add functions/methods whose code coverage is lower or greater than threshold values.

For example, the strings package in the standard library have only 12 functions/methods with a code coverage < 100%.
Using a CLI flag -cmax 97 would add those 12 functions only into the generated HTML output.

Setting a threshold value can be useful to quickly find what is left for testing and generate the HTML output faster.

Example

$ gocov test strings | gocov-html -cmax 97
  • Add a -cmax flag (default: 100) stating "only show functions whose coverage is less than cmax"
  • Add a -cmin flag (default: 0) stating "only show functions whose coverage is more than cmin"
  • Only take into account functions/methods whose code coverage is lower than the max value. Same regarding min value.
  • Update README documentation

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions