opa
opa copied to clipboard
Formatter rewrites quoted reference containing keyword to non-quoted one which fails to parse
package p
import rego.v1
foo := data.foo.bar["contains"]("baz")
running opa fmt
on this file rewrites the ref:
package p
import rego.v1
foo := data.foo.bar.contains("baz")
which doesn't parse, as contains
is of course a keyword
(although, a keyword that is also a built-in function, and shouldn't be considered a keyword at this location, but that's another issue)