From 69b6d729346505ad4f79ec3549b0ff8f003eef7c Mon Sep 17 00:00:00 2001 From: Florent Biville Date: Mon, 13 Feb 2023 11:44:04 +0100 Subject: [PATCH] Pin `staticcheck` version `staticcheck` recent versions have upgraded their Go baseline version to > 1.18, which breaks this driver's build. We only allow Go version bumps in major releases of the driver, so upgrades of `staticcheck` will not be possible before 6.0! --- hooks/pre-commit | 2 +- testkit/build.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index cd21c1cd..5d0eeac6 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -6,7 +6,7 @@ grep_not(){ ! grep "${@}"; return $?;} echo "# pre-commit hook" printf '%-15s' "## staticcheck " -cd "$(mktemp -d)" && go install honnef.co/go/tools/cmd/staticcheck@latest && cd - > /dev/null +cd "$(mktemp -d)" && go install honnef.co/go/tools/cmd/staticcheck@v0.3.3 && cd - > /dev/null "${GOBIN:-$(go env GOPATH)/bin}"/staticcheck ./... echo "✅" diff --git a/testkit/build.py b/testkit/build.py index 77bb3edd..b4c1f51a 100644 --- a/testkit/build.py +++ b/testkit/build.py @@ -31,7 +31,7 @@ def run(args, env=None): run(["go", "vet", "./..."], env=defaultEnv) print("Install staticcheck", flush=True) - run(["go", "install", "honnef.co/go/tools/cmd/staticcheck@latest"], env=defaultEnv) + run(["go", "install", "honnef.co/go/tools/cmd/staticcheck@v0.3.3"], env=defaultEnv) print("Run staticcheck", flush=True) gopath = Path(