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>
In topdown, we have two different error modes: strict/non-strict.
In WASM, everything is meant to be non-strict. Thus errors that
only appear in topdown with strict mode are annotated as such,
and checked for an empty result-set in the WASM test runner.
Several WASM builtins that have returned an error where they should
return NULL have been adjusted.
This allows us to fix most of the exceptions brought up in #2954.
Notable pieces:
* wasm sdk: ignore builtin errors
This should be in line with the non-strict builtin error semantics used
in WASM.
Before, when the WASM SDK had called out top a topdown-defined builtin,
and that builtin had returned an error, the WASM caller returned that
error. It's been at odds with how topdown evaluated builtin errors when
run without strict builtin errors.
Now, the errors are properly ignored, except for topdown.Halt. That one
doesn't seem like it's used at the moment, at least from this code base.
* cases: add want_result where non-strict eval yields something
This happens to work for both topdown and wasm:
- in topdown, the test runner checks for expected errors first, and
ignores the wanted result;
- in wasm, we check for a desired result first, checking the error
if no result was defined.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>