all: resolve unused value and yoda conditionals staticcheck warnings
Values which are assigned to a variable but unused are either benign,
which cause the code to be confusing to the reader,
or actually lead to bugs, such as missed error checks in some tests.
Also, consistently place the constant on the right side in comparisons.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Icb5ef7c57fd26c6e2f82bf7309ebcbea1c5d0fbe
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195056
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>