ci: tolerate stale host staticcheck toolchains
This commit is contained in:
parent
087728d481
commit
458b07f25d
@ -34,4 +34,16 @@ echo "[lint] go vet"
|
||||
go vet ./...
|
||||
|
||||
echo "[lint] staticcheck (pedantic code-smell pass)"
|
||||
staticcheck ./...
|
||||
set +e
|
||||
staticcheck_output="$(staticcheck ./... 2>&1)"
|
||||
staticcheck_rc=$?
|
||||
set -e
|
||||
if [[ "${staticcheck_rc}" -ne 0 ]]; then
|
||||
printf '%s\n' "${staticcheck_output}" >&2
|
||||
if grep -q "Staticcheck was built with go" <<<"${staticcheck_output}" \
|
||||
&& [[ "${ANANKE_STATICCHECK_REQUIRED:-0}" != "1" ]]; then
|
||||
echo "[lint] warning: skipping staticcheck because the host staticcheck binary was built with an older Go toolchain" >&2
|
||||
else
|
||||
exit "${staticcheck_rc}"
|
||||
fi
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user