-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only use colors if the handle supports ANSI
- Loading branch information
1 parent
b2c1a72
commit 2c2e16a
Showing
54 changed files
with
357 additions
and
356 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
resolver: 'lts-15.6' | ||
resolver: 'lts-16.9' | ||
|
||
# Dev options | ||
ghc-options: | ||
|
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,2 +1,2 @@ | ||
repl% [36m=[0m [31m"Hello, world!"[0m | ||
repl% = "Hello, world!" | ||
repl% |
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,34 +1,34 @@ | ||
fregot ([34mcompile error[0m): | ||
fregot (compile error): | ||
"assign-rule-01.rego" (line 4, column 1): | ||
bad default: | ||
|
||
4| default allow := false | ||
[31m^^^^^^^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Default rules should use `=` rather than `:=`. | ||
|
||
fregot ([34mcompile error[0m): | ||
fregot (compile error): | ||
"assign-rule-01.rego" (line 8, column 1): | ||
conflicting `:=` rule: | ||
|
||
8| pi = 3.14 | ||
[31m^^^^^^^^^[0m | ||
^^^^^^^^^ | ||
|
||
rules declared using `:=` cannot have multiple definitions | ||
|
||
"assign-rule-01.rego" (line 7, column 1): | ||
conflicting `:=` rule: | ||
|
||
7| pi := 3.14 | ||
[31m^^^^^^^^^^[0m | ||
^^^^^^^^^^ | ||
|
||
rules declared using `:=` cannot have multiple definitions | ||
|
||
fregot ([34mcompile error[0m): | ||
fregot (compile error): | ||
"assign-rule-01.rego" (line 11, column 1): | ||
bad assignment: | ||
|
||
11| double(x) := ret {ret := x + x} | ||
[31m^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^ | ||
|
||
Functions should use `=` rather than `:=`. |
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,8 +1,8 @@ | ||
fregot ([34mfatal parse error[0m): | ||
fregot (fatal parse error): | ||
"bad-import.rego" (line 3, column 8): | ||
parse failed: | ||
|
||
3| import wat.foo | ||
[31m^[0m | ||
^ | ||
|
||
unexpected wat.foo (imports should start with `data.` or `input.`) |
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,25 @@ | ||
fregot ([34mtypecheck error[0m): | ||
fregot (typecheck error): | ||
"builtins-01.rego" (line 5, column 3): | ||
Subtype error: | ||
|
||
5| all({"foo": true, "bar": false, "baz": 100}) | ||
[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Cannot use type [33m[34mobject[0m[36m{[0m | ||
[31m"bar"[0m[36m:[0m [34mboolean[0m[36m,[0m | ||
[31m"foo"[0m[36m:[0m [34mboolean[0m[36m,[0m | ||
[31m"baz"[0m[36m:[0m [34mnumber[0m | ||
[36m}[0m[0m as [33m[34mset[0m[36m{[0m[34mboolean[0m[36m}[0m[36m|[0m[34mobject[0m[36m{[0m[34many[0m[36m:[0m [34mboolean[0m[36m}[0m[36m|[0m[34marray[0m[36m{[0m[34mnumber[0m[36m:[0m [34mboolean[0m[36m}[0m[0m | ||
Cannot use type object{ | ||
"bar": boolean, | ||
"foo": boolean, | ||
"baz": number | ||
} as set{boolean}|object{any: boolean}|array{number: boolean} | ||
|
||
fregot ([34mtypecheck error[0m): | ||
fregot (typecheck error): | ||
"builtins-01.rego" (line 9, column 3): | ||
Subtype error: | ||
|
||
9| any({"foo": true, "bar": false, "baz": 100}) | ||
[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Cannot use type [33m[34mobject[0m[36m{[0m | ||
[31m"bar"[0m[36m:[0m [34mboolean[0m[36m,[0m | ||
[31m"foo"[0m[36m:[0m [34mboolean[0m[36m,[0m | ||
[31m"baz"[0m[36m:[0m [34mnumber[0m | ||
[36m}[0m[0m as [33m[34mset[0m[36m{[0m[34mboolean[0m[36m}[0m[36m|[0m[34mobject[0m[36m{[0m[34many[0m[36m:[0m [34mboolean[0m[36m}[0m[36m|[0m[34marray[0m[36m{[0m[34mnumber[0m[36m:[0m [34mboolean[0m[36m}[0m[0m | ||
Cannot use type object{ | ||
"bar": boolean, | ||
"foo": boolean, | ||
"baz": number | ||
} as set{boolean}|object{any: boolean}|array{number: boolean} |
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,17 +1,17 @@ | ||
fregot ([34mtypecheck error[0m): | ||
fregot (typecheck error): | ||
"builtins-02.rego" (line 5, column 3): | ||
Subtype error: | ||
|
||
5| 0 - set() | ||
[31m^^^^^^^^^[0m | ||
^^^^^^^^^ | ||
|
||
Cannot use type [33m[34mnumber[0m[0m as [33m[34mset[0m[36m{[0m[34many[0m[36m}[0m[0m | ||
Cannot use type number as set{any} | ||
|
||
fregot ([34mtypecheck error[0m): | ||
fregot (typecheck error): | ||
"builtins-02.rego" (line 9, column 3): | ||
Subtype error: | ||
|
||
9| set() - 0 | ||
[31m^^^^^^^^^[0m | ||
^^^^^^^^^ | ||
|
||
Cannot use type [33m[34mnumber[0m[0m as [33m[34mset[0m[36m{[0m[34many[0m[36m}[0m[0m | ||
Cannot use type number as set{any} |
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,25 @@ | ||
fregot ([34mcompile error[0m): | ||
fregot (compile error): | ||
"default-index.rego" (line 5, column 1): | ||
complete definition mismatch: | ||
|
||
5| power_level[character] = level { | ||
[31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
generates an object | ||
|
||
"default-index.rego" (line 3, column 1): | ||
complete definition mismatch: | ||
|
||
3| default power_level = 9001 | ||
[31m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
is a complete rule | ||
|
||
fregot ([34mtypecheck error[0m): | ||
fregot (typecheck error): | ||
"default-index.rego" (line 5, column 26): | ||
Unbound variables: | ||
|
||
5| power_level[character] = level { | ||
[31m^^^^^[0m | ||
^^^^^ | ||
|
||
The variable [33mlevel[0m is referenced, but it is never assigned a value | ||
The variable level is referenced, but it is never assigned a value |
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,13 @@ | ||
passed: 0, failed: 0, errored: 1 | ||
fregot.tests.invalid.inconsistent.test_a: | ||
fregot ([34meval error[0m): | ||
fregot (eval error): | ||
"inconsistent.rego" (line 4, column 1): | ||
inconsistent result: | ||
|
||
4| a = 2 | ||
[31m^^^^^[0m | ||
^^^^^ | ||
|
||
Inconsistent result for complete rule, but got: | ||
[31m2[0m | ||
2 | ||
And: | ||
[31m1[0m | ||
1 |
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,9 +1,9 @@ | ||
fregot ([34mfatal parse error[0m): | ||
fregot (fatal parse error): | ||
"missing-package-decl.rego" (line 1, column 1): | ||
parse failed: | ||
|
||
1| default allow = false | ||
[31m^[0m | ||
^ | ||
|
||
unexpected keyword 'default' | ||
expecting 'package' declaration |
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,19 @@ | ||
passed: 0, failed: 0, errored: 1 | ||
fregot.tests.invalid.obj_01.test_inconsistency: | ||
fregot ([34meval error[0m): | ||
fregot (eval error): | ||
"obj-01.rego" (line 7, column 3): | ||
inconsistent object: | ||
|
||
7| inconsistent == {"hi": 1} | ||
[31m^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^ | ||
|
||
Object key-value pairs must be consistent, but got: | ||
[31m1[0m | ||
1 | ||
And: | ||
[31m2[0m | ||
2 | ||
For key: | ||
[31m"hi"[0m | ||
"hi" | ||
|
||
Stack trace: | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mobj_01[0m[36m.[0minconsistent[0m at obj-01.rego:7:3 | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mobj_01[0m[36m.[0mtest_inconsistency[0m at tests:1:1 | ||
rule fregot.tests.invalid.obj_01.inconsistent at obj-01.rego:7:3 | ||
rule fregot.tests.invalid.obj_01.test_inconsistency at tests:1:1 |
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,8 +1,8 @@ | ||
fregot ([34mrecursion check error[0m): | ||
fregot (recursion check error): | ||
"recursive-01.rego" (line 3, column 1): | ||
rule is recursive: | ||
|
||
3| foo { | ||
[31m^^^[0m | ||
^^^ | ||
|
||
This rule is recursive. |
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,8 +1,8 @@ | ||
fregot ([34mrecursion check error[0m): | ||
fregot (recursion check error): | ||
"recursive-02.rego" (line 3, column 1): | ||
rule is recursive: | ||
|
||
3| foo { | ||
[31m^^^[0m | ||
^^^ | ||
|
||
This rule is recursive. |
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,33 +1,33 @@ | ||
fregot ([34mrecursion check error[0m): | ||
fregot (recursion check error): | ||
"recursive-03.rego" (line 3, column 1): | ||
rules are recursive: | ||
|
||
3| foo { | ||
[31m^^^[0m | ||
^^^ | ||
|
||
These rules are mutually recursive: | ||
[33mfoo[0m | ||
[33mbar[0m | ||
[33mqux[0m | ||
foo | ||
bar | ||
qux | ||
|
||
"recursive-03.rego" (line 7, column 1): | ||
rules are recursive: | ||
|
||
7| bar { | ||
[31m^^^[0m | ||
^^^ | ||
|
||
These rules are mutually recursive: | ||
[33mfoo[0m | ||
[33mbar[0m | ||
[33mqux[0m | ||
foo | ||
bar | ||
qux | ||
|
||
"recursive-03.rego" (line 11, column 1): | ||
rules are recursive: | ||
|
||
11| qux { | ||
[31m^^^[0m | ||
^^^ | ||
|
||
These rules are mutually recursive: | ||
[33mfoo[0m | ||
[33mbar[0m | ||
[33mqux[0m | ||
foo | ||
bar | ||
qux |
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,16 +1,16 @@ | ||
passed: 0, failed: 0, errored: 1 | ||
fregot.tests.invalid.stack_trace_01.test_stack_trace: | ||
fregot ([34meval error[0m): | ||
fregot (eval error): | ||
"stack-trace-01.rego" (line 5, column 3): | ||
builtin type error: | ||
|
||
5| x + input.msg with input as {"msg": "crash"} | ||
[31m^^^^^^^^^^^^^[0m | ||
^^^^^^^^^^^^^ | ||
|
||
Expected number but got string | ||
|
||
Stack trace: | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mstack_trace_01[0m[36m.[0mrule1[0m at stack-trace-01.rego:9:3 | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mstack_trace_01[0m[36m.[0mrule2[0m at stack-trace-01.rego:13:3 | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mstack_trace_01[0m[36m.[0mrule3[0m at stack-trace-01.rego:17:3 | ||
rule [33m[35mfregot[0m[36m.[0m[35mtests[0m[36m.[0m[35minvalid[0m[36m.[0m[35mstack_trace_01[0m[36m.[0mtest_stack_trace[0m at tests:1:1 | ||
rule fregot.tests.invalid.stack_trace_01.rule1 at stack-trace-01.rego:9:3 | ||
rule fregot.tests.invalid.stack_trace_01.rule2 at stack-trace-01.rego:13:3 | ||
rule fregot.tests.invalid.stack_trace_01.rule3 at stack-trace-01.rego:17:3 | ||
rule fregot.tests.invalid.stack_trace_01.test_stack_trace at tests:1:1 |
Oops, something went wrong.