This commit adds a config for yamllint, mass-reformats all of
the existing Yaml testcases to pass linting, and adds a Yaml
linting job to the pull-request Github Actions workflow. A few
careful exceptions and ignores were added to the linter's
config to allow keeping our existing Yaml files with minimal
reformatting.
Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
* ast/term: sort-on-insert for object.keys slice
Instead of sorting on each call including Compare() or String(), we'll sort the key
slice on insertion of a new value.
* testcases: add case
As observed in the original issue, the failure does not happen on every
run. To observe the added test case _failing_ on branch main, use a test
call like
go test -v ./topdown -run TestRego/partialsetdoc:_object_sort_while_iter -count=10 -v
The added `sort_bindings: true` is not required for the topdown eval,
but when executing this on the wasm engine, the (unspecified, non-
guaranteed) order is reversed.
Fixes#3819
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Before, we were passing `e.bindings` for both terms, result and e.rterm.
The result's bindings, however, are e.rbindings and we should be passing
those to biunify.
Fixes#3369.
Fixes#3376.
Co-authored-by: Torin Sandall <torinsandall@gmail.com>
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>