You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@segrax thanks for filing this! Sorry for the delayed response (reason: holidays, catching up on issues/emails after coming back, etc.)
This looks like a bug in the coverage reporter/calculation (cover/cover.go). The problem (I think) is that some statements do not actually get evaluated (they're used for semantic checks but the evaluator doesn't look at them.) The coverage reporter is probably should just exclude these statements when checking whether statements have been executed.
They would previously show up as not-covered in any report. This
changes to simply omit them. They will never be int the resulting
covered or not-covered lists, or count against the % covered.
Fixes: open-policy-agent#1972
Signed-off-by: Patrick East <east.patrick@gmail.com>
They would previously show up as not-covered in any report. This
changes to simply omit them. They will never be int the resulting
covered or not-covered lists, or count against the % covered.
Fixes: #1972
Signed-off-by: Patrick East <east.patrick@gmail.com>
Expected Behavior
variables are either marked as covered when used or just ignored completely?
Actual Behavior
any variable, whether its used or not is listed as 'not_covered' in the coverage report
Steps to Reproduce the Problem
Using the example policy and test from Getting Started
opa test /srv/app/example.rego /srv/app/example_test.rego -v --coverage --format=json
the coverage report indicates that row 9 is not covered
Line 9 of example.rego reads 'some profile_id' (which is referenced in line 12)
Additional Info
Version: 0.16.0
Build Commit: b50e626
Build Timestamp: 2019-12-19T13:13:32Z
Build Hostname: 08f277b56fc6
The text was updated successfully, but these errors were encountered: