forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast: Fix ordering of rule type checking errors
Previously the type checker would not sort errors before returning them. As a result, the ordering of errors would depend on the order of rules passed to the type checker (which is non-deterministic due to Go map iteration order.) These changes update the type checker to sort errors by location before before returning them. This way the errors reported by opa test and opa check and everything else are consistent across runs. Fixes open-policy-agent#1620 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 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