Beginning with Go 1.16, the simplest way of installing Staticcheck is by running
go install honnef.co/go/tools/cmd/staticcheck@latest.
This will install the latest version of Staticcheck to
$GOPATH/bin. To find out where
$GOPATH is, run
go env GOPATH.
@latest, you can also use a specific version, such as
If you'd like to be notified of new releases, you can use GitHub's Releases only watches.
We publish binary releases for the most common operating systems and CPU architectures. These can be downloaded from GitHub.
Many package managers include Staticcheck, allowing you to install it with your usual commands, such as
Note, however, that you might not always get the latest version in a timely manner.
What follows is a non-exhaustive list of the package names in various package repositories.