Files
releases/format/testfiles/test.rego.error
T
Matthew Mussomele 45af66c63b Correct OPA fmt to leave policy constants as Bodies
When parsing, OPA transforms constants into rules with only the
expression `true` in the body. This is not desirable behavior, as
it's much cleaner for them to be expressed in the shorthand.

This patch also adds a test for parsing invalid rego.
2017-06-30 10:51:10 -04:00

27 lines
445 B
Plaintext

# The blank lines below me should be gone! (except one)
# Comment!
package a.b
# I also, am a comment.
import data.x.y.z
import data.a.b.c # Another comment!
# I belong with data.a, there should be a newline before me.
import data.a
import data.f.g
default foo = false
foo[x] {
not x = g
}
globals = {"foo": "bar",
"fizz": "buzz"}
# Latent comment.
r = y {
y = x
split("foo.bar", ".", input.x) with input as {"x": x}