-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Support the defaulting of rules in config (#587)
* config: Support the defaulting of rules in config This PR implements an approach to rule defaulting described in: #153 (comment) Signed-off-by: Charlie Egan <charlie@styra.com> * Address linter and refactor Signed-off-by: Charlie Egan <charlie@styra.com> * Add e2e test for config defaulting and flag use Signed-off-by: Charlie Egan <charlie@styra.com> * Add new notes for defaulting in README Signed-off-by: Charlie Egan <charlie@styra.com> --------- Signed-off-by: Charlie Egan <charlie@styra.com>
- Loading branch information
1 parent
9da1796
commit 9e9a30e
Showing
8 changed files
with
580 additions
and
54 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
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,11 @@ | ||
rules: | ||
default: | ||
level: ignore | ||
bugs: | ||
default: | ||
level: error | ||
rule-shadows-builtin: | ||
level: ignore | ||
testing: | ||
print-or-trace-call: | ||
level: error |
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,9 @@ | ||
package p | ||
import rego.v1 | ||
boo := input.hoo[_] | ||
opa_fmt := "fail" | ||
or := 1 | ||
|
||
allow if { | ||
print("hello") | ||
} |
Oops, something went wrong.