ci: tolerate stale host staticcheck toolchains

This commit is contained in:
codex 2026-05-15 19:52:41 -03:00
parent 087728d481
commit 458b07f25d

View File

@ -34,4 +34,16 @@ echo "[lint] go vet"
go vet ./... go vet ./...
echo "[lint] staticcheck (pedantic code-smell pass)" 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