# Install staticcheck with Homebrew, apk, dnf, MacPorts, pacman, scoop

State of the art linter for the Go programming language. Version 2026.1 via Homebrew; verified 2026-07-08.

## Install

```sh
sudo av install brew:staticcheck
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install staticcheck
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install staticcheck
```

  Evidence: MacPorts ports tree: devel/staticcheck/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add staticcheck
```

  Evidence: Alpine Linux edge package indexes: staticcheck from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install staticcheck
```

  Evidence: Fedora Rawhide package metadata: staticcheck from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S staticcheck
```

  Evidence: Arch Linux sync databases: staticcheck from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/staticcheck
```

  Evidence: Scoop official bucket manifest trees: bucket/staticcheck.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:staticcheck
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/staticcheck>
- **Version:** 2026.1
- **Source summary:** State of the art linter for the Go programming language
- **Homepage:** <https://staticcheck.dev/>
- **Repository:** <https://github.com/dominikh/go-tools>
- **Upstream docs:** <https://staticcheck.dev/docs>
- **License:** MIT
- **Source archive:** <https://github.com/dominikh/go-tools/archive/refs/tags/2026.1.tar.gz>
- **Last updated:** 2026-07-08T03:14:15Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- staticcheck (cli)
- staticcheck (alias)

## Dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2026.1
- Package-manager updated: 2026-07-08
- Local data: ok
- Upstream repository: https://github.com/dominikh/go-tools
- Upstream latest detected: 2026.1 (current)
## Project history and usage

Staticcheck is a Go static-analysis command-line tool and one of the best-known third-party linters in the Go ecosystem. It is packaged as the `staticcheck` executable and is commonly installed with Go tooling or system package managers for local development and CI.

### Project history

The upstream project lives in Dominik Honnef's `go-tools` repository, which was created in January 2017. The official README describes Staticcheck as an advanced Go linter that finds bugs and performance issues, offers simplifications, and enforces style rules.

Staticcheck publishes release notes on staticcheck.dev. The release-note index records releases from 2017.2 through the 2026 series, showing a long-running tool with versioned compatibility work alongside Go's release cadence.

### Adoption history

The input package metadata lists Staticcheck in Homebrew, Alpine, Fedora, MacPorts, Arch, and Scoop. The official documentation also recommends installing released versions with `go install honnef.co/go/tools/cmd/staticcheck@latest` on modern Go versions or using prebuilt binaries from GitHub releases.

Staticcheck's package-manager footprint reflects its role as a standard quality gate for Go projects. It is useful as a standalone CLI, as a CI check, and as a linter that complements the Go compiler and `go vet`.

### How it is used

Typical usage is to run `staticcheck` against Go packages or wire it into CI. The tool can analyze code targeting Go versions up to the latest release, while the project recommends using tagged releases instead of master for stable builds.

### Why package nerds care

Package nerds care about Staticcheck because it is a canonical example of a language ecosystem tool that lives outside the core toolchain but is widely treated as infrastructure. Its version tags, prebuilt binaries, and `go install` path make it straightforward to pin in reproducible builds.

For package managers, Staticcheck is high-value despite being a single executable: it is heavily used by Go developers, has stable release notes, and represents the broader `honnef.co/go/tools` analyzer collection.

### Timeline

- 2017: `dominikh/go-tools` repository created.
- 2017: Staticcheck 2017.2 release published.
- 2019: Staticcheck 2019.2 release notes described major performance and memory improvements.
- 2026: Staticcheck 2026.1 and 2026.2 release candidates appeared in official releases.

### Related projects

- The same repository contains related tools such as `structlayout`, `structlayout-optimize`, and `structlayout-pretty`, and libraries used to implement the tools.

### Sources

- <https://github.com/dominikh/go-tools>
- <https://raw.githubusercontent.com/dominikh/go-tools/master/README.md>
- <https://staticcheck.dev/changes/>
- <https://staticcheck.dev/docs/getting-started/>
- input.source_facts.package-manager


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: staticcheck.conf
- Windows: staticcheck.conf
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** staticcheck
- **Version Scheme:** 0
- **Revision:** 5
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- apk - staticcheck - 2026.1-r3: normalized package name match | Alpine Linux edge package indexes: staticcheck from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | advanced Go linter | https://github.com/dominikh/go-tools
- dnf - staticcheck - 2026.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: staticcheck from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The advanced Go linter | https://github.com/dominikh/go-tools
- pacman - staticcheck - 2026.1-3: normalized package name match | Arch Linux sync databases: staticcheck from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The advanced Go linter | https://staticcheck.io
- MacPorts - staticcheck: normalized package name match | MacPorts ports tree: devel/staticcheck/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/staticcheck: normalized package name match | Scoop official bucket manifest trees: bucket/staticcheck.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Runtime dependency declared by Homebrew.
- [go-critic](https://www.automicvault.com/pkg/brew/go-critic/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, go, linter.
- [revive](https://www.automicvault.com/pkg/brew/revive/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, go, linter.
- [datadog-static-analyzer](https://www.automicvault.com/pkg/brew/datadog-static-analyzer/) - Shares av.db curated category or tags: ci, cli, code-quality, developer-tools, static-analysis.
- [errcheck](https://www.automicvault.com/pkg/brew/errcheck/) - Shares av.db curated category or tags: cli, developer-tools, go, linter, static-analysis.
- [eslint](https://www.automicvault.com/pkg/brew/eslint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [globstar](https://www.automicvault.com/pkg/brew/globstar/) - Shares av.db curated category or tags: ci, cli, code-quality, developer-tools, static-analysis.
- [golangci-lint](https://www.automicvault.com/pkg/brew/golangci-lint/) - Shares av.db curated category or tags: ci, cli, developer-tools, go, static-analysis.
- [luacheck](https://www.automicvault.com/pkg/brew/luacheck/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.

## Combined YAML source

View the package source record on GitHub. [combined/staticcheck.yml](https://github.com/automic-vault/db/blob/main/combined/staticcheck.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
