Skip to content

Commit

Permalink
Pin staticcheck version to v0.2.2 (#63)
Browse files Browse the repository at this point in the history
The CI pipeline has been broken in this project for some time because
the latest version of staticcheck is not compatible with every version
of Go. Through trial and error, it was discovered that staticcheck
v0.2.2 is the latest version that is compatible with Go 1.16.

The authors of staticcheck also recommend pinning the version in CI
pipelines to prevent unintentional breakage of the build [1].

References
[1]: https://staticcheck.io/docs/running-staticcheck/ci/github-actions/#version
  • Loading branch information
samherrmann committed Feb 3, 2023
1 parent 8012d49 commit 78a3d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Get dependencies
run: go get -t -v ./...
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
- name: Lint
run: staticcheck -checks=all ./...
- name: Test
Expand Down

0 comments on commit 78a3d79

Please sign in to comment.