Rego test coverage gaps
rego_coverage_gapsAnalyzes Rego test coverage to identify uncovered line ranges, sorted by coverage ascending. Optionally restricts report to files below a threshold percentage.
Instructions
Run opa test --coverage and return a per-file breakdown of uncovered line ranges. Identifies which rules or branches are not yet exercised by tests. Files are sorted by coverage ascending so the worst-covered files appear first. Use threshold to limit the report to files below a target coverage percentage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Test directories or files. opa test looks for *_test.rego siblings of source files. | |
| threshold | No | Report only files below this coverage percentage (0-100). When omitted, all files with uncovered ranges are reported. | |
| runPattern | No | Run only tests whose names match this regex. |