forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linters+testdata: Reformat all yaml testcases for linting. (open-poli…
…cy-agent#6511) This commit adds a config for yamllint, mass-reformats all of the existing Yaml testcases to pass linting, and adds a Yaml linting job to the pull-request Github Actions workflow. A few careful exceptions and ignores were added to the linter's config to allow keeping our existing Yaml files with minimal reformatting. Signed-off-by: Philip Conrad <[email protected]>
- Loading branch information
1 parent
018b8ad
commit 63e1877
Showing
1,140 changed files
with
31,838 additions
and
30,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extends: default | ||
|
||
rules: | ||
# Some of our testcases end up going past the default 80 character limit. | ||
line-length: false | ||
braces: | ||
max-spaces-inside: 1 | ||
comments: | ||
min-spaces-from-content: 1 | ||
indentation: | ||
ignore: | ||
- test-time-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
--- | ||
cases: | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
__local0__ = data.a | ||
count(__local0__, x) | ||
} | ||
note: aggregates/count | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 4 | ||
p[x] { | ||
__local0__ = data.a | ||
count(__local0__, x) | ||
} | ||
note: aggregates/count | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
--- | ||
cases: | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
__local0__ = [y | data.generated.q[y]] | ||
count(__local0__, x) | ||
} | ||
p[x] { | ||
__local0__ = [y | data.generated.q[y]] | ||
count(__local0__, x) | ||
} | ||
q[x] { | ||
x = data.a[_] | ||
} | ||
note: aggregates/count virtual | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 4 | ||
q[x] { | ||
x = data.a[_] | ||
} | ||
note: aggregates/count virtual | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
--- | ||
cases: | ||
- data: | ||
b: | ||
v1: hello | ||
v2: goodbye | ||
modules: | ||
- | | ||
package generated | ||
- data: | ||
b: | ||
v1: hello | ||
v2: goodbye | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
__local0__ = data.b | ||
count(__local0__, x) | ||
} | ||
note: aggregates/count keys | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 2 | ||
p[x] { | ||
__local0__ = data.b | ||
count(__local0__, x) | ||
} | ||
note: aggregates/count keys | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
--- | ||
cases: | ||
- data: | ||
b: | ||
v1: hello | ||
v2: goodbye | ||
modules: | ||
- | | ||
package generated | ||
- data: | ||
b: | ||
v1: hello | ||
v2: goodbye | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
__local0__ = [k | data.generated.q[k] = _] | ||
count(__local0__, x) | ||
} | ||
p[x] { | ||
__local0__ = [k | data.generated.q[k] = _] | ||
count(__local0__, x) | ||
} | ||
q[k] = v { | ||
data.b[k] = v | ||
} | ||
note: aggregates/count keys virtual | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 2 | ||
q[k] = v { | ||
data.b[k] = v | ||
} | ||
note: aggregates/count keys virtual | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
--- | ||
cases: | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
- data: | ||
a: | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
modules: | ||
- | | ||
package generated | ||
p = x { | ||
__local0__ = data.generated.q | ||
count(__local0__, x) | ||
} | ||
p = x { | ||
__local0__ = data.generated.q | ||
count(__local0__, x) | ||
} | ||
q[x] { | ||
x = data.a[_] | ||
} | ||
note: aggregates/count set | ||
query: data.generated.p = x | ||
want_result: | ||
- x: 4 | ||
q[x] { | ||
x = data.a[_] | ||
} | ||
note: aggregates/count set | ||
query: data.generated.p = x | ||
want_result: | ||
- x: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
--- | ||
cases: | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
p[x] { | ||
sum([1, 2, 3, 4], x) | ||
} | ||
note: aggregates/sum | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 10 | ||
p[x] { | ||
sum([1, 2, 3, 4], x) | ||
} | ||
note: aggregates/sum | ||
query: data.generated.p = x | ||
sort_bindings: true | ||
want_result: | ||
- x: | ||
- 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
--- | ||
cases: | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
- data: {} | ||
modules: | ||
- | | ||
package generated | ||
p = x { | ||
sum({1, 2, 3, 4}, x) | ||
} | ||
note: aggregates/sum set | ||
query: data.generated.p = x | ||
want_result: | ||
- x: 10 | ||
p = x { | ||
sum({1, 2, 3, 4}, x) | ||
} | ||
note: aggregates/sum set | ||
query: data.generated.p = x | ||
want_result: | ||
- x: 10 |
Oops, something went wrong.