SIGN IN SIGN UP

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 #1620

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
2b77240883793babb0e1613652f21e26b7e44253
Parent: b052346