-
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.
Fix bug causing
prefer-some-in-iteration
not to be reported (#902)
This was due to an unfortunate combination of trying to be lenient about `coll[_]` used in the position of a function arg (as that's not *directly* replaceable by `some .. in` **but** not excluding operators like `:=` from functions (where it _should_ be replaced by `some .. in`) **and** many tests for this rule missing to provide the built-in functions as a mocked dependency. Will need to think some about how to best avoid this to happen again. Also: - Replace `ast.policy` in tests with `ast.with_rego_v1` - Fix docs that used `=` for assignment rather than `:=` Fixes #901 Signed-off-by: Anders Eknert <anders@styra.com>
- Loading branch information
1 parent
bb790c5
commit 812ab2b
Showing
4 changed files
with
68 additions
and
26 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
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