Closed srenatus closed 1 day ago
Very! I'll take a look. Thanks for reporting that!
Running regal parse p.rego | opa eval -f pretty -I '[h | h := input.rules[_].head]'
and looking at the refs, the first one does not come with location attributes, which is why evaluation fails in that case, and the violation remains unreported although it was found.
"ref": [
{
"type": "var",
"value": "output"
},
{
"type": "string",
"value": "initToggled"
}
],
"ref": [
{
"location": {
"col": 1,
"row": 7,
"text": "b3V0cHV0"
},
"type": "var",
"value": "output"
},
{
"location": {
"col": 8,
"row": 7,
"text": "InVzZXJLYXJtYSI="
},
"type": "string",
"value": "userKarma"
}
],
OPA bug, I guess? Either way, I'll try to come up with some workaround in the meantime.
OPA issue created: https://github.com/open-policy-agent/opa/issues/6860
this PG
shows me one finding,
style/prefer-snake-case
on line 7I would expect it to flag line 5 ("initToggled"), too. Or neither one of them; but having one of the two fail seems a little odd 🤔