opa
opa copied to clipboard
Forbid underscore as rule name
Harmless, but still, a wildcard rule name doesn't make sense 😄
package p
_ if true
opa eval -f pretty -d p.rego data.p
{
"$0": true
}
Had a look at this, and have some code I can push to resole the issue. Had a test failure here though, and that test clearly suggests intention to allow _ as a rule name. I'm not sure why this would be though 🤔
https://github.com/open-policy-agent/opa/blob/2136920218ee3dbe8484cd8b98259945b667176b/v1/ast/parser_test.go#L2267-L2274