From 458b07f25d20f806ee80b101ed9826b2c0db5509 Mon Sep 17 00:00:00 2001 From: codex Date: Fri, 15 May 2026 19:52:41 -0300 Subject: [PATCH] ci: tolerate stale host staticcheck toolchains --- scripts/lint.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index b4db8c8..7420ed3 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -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