Skip to content

Commit

Permalink
Pin staticcheck version
Browse files Browse the repository at this point in the history
`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!
  • Loading branch information
fbiville committed Feb 13, 2023
1 parent b679737 commit 69b6d72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down
2 changes: 1 addition & 1 deletion testkit/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 69b6d72

Please sign in to comment.