# 使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 golangci-lint

查看 golangci-lint 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:golangci-lint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install golangci-lint
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install golangci-lint
```

  证据: MacPorts ports tree: devel/golangci-lint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add golangci-lint
```

  证据: Alpine Linux edge package indexes: golangci-lint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install golangci-lint
```

  证据: Fedora Rawhide package metadata: golangci-lint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#golangci-lint
```

  证据: nixpkgs package indexes: pkgs/by-name/go/golangci-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S golangci-lint
```

  证据: Arch Linux sync databases: golangci-lint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install golangci-lint
```

  证据: openSUSE Tumbleweed package metadata: golangci-lint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install golangci-lint
```

  证据: Chocolatey community package catalog: golangci-lint from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','gitextensions'

- Scoop (92%):

```sh
scoop install main/golangci-lint
```

  证据: Scoop official bucket manifest trees: bucket/golangci-lint.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id GolangCI.golangci-lint -e
```

  证据: Windows Package Manager source index: GolangCI.golangci-lint from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:golangci-lint
- **软件包管理器:** Homebrew
- **版本:** 2.12.2
- **来源摘要:** Fast linters runner for Go
- **主页:** <https://golangci-lint.run/>
- **仓库:** <https://github.com/golangci/golangci-lint>
- **最后更新:** 2026-07-27T16:47:24+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- golangci-lint (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.12.2
## 项目历史与用法

golangci-lint is a fast Go linters runner. The project presents itself as a parallel, cached runner with YAML configuration, major IDE integration, and more than one hundred included linters.

### 项目历史

The GitHub repository was created in May 2018. The project grew around a simple premise: run many Go linters together, make the result fast enough for local and CI use, and centralize configuration in `.golangci` files.

By 2019 and 2020 the changelog shows the project adding Go version support, more linters, GitHub Actions output, bash completions, junit-xml output, auto-fixing improvements, and a dedicated website. The May 2020 changelog entry records the launch of `golangci-lint.run`.

The v1 line accumulated a long compatibility history and ended with the project documenting v1.64.2 as the last minor v1 release before v2. The v2 changelog begins in 2025 and introduced product-level changes such as a new `golangci-lint fmt` command and separated v1/v2 changelog documentation.

### 采用历史

golangci-lint became a default Go quality gate because it packaged many independent analyzers behind one binary and one config file. Its README advertises installation for local machines and CI/CD systems, and the batch input records packages across apk, Homebrew, Chocolatey, dnf, MacPorts, Nix, pacman, Scoop, winget, and zypper.

The project also maintains an official GitHub Action, listed in GitHub Marketplace, for running golangci-lint and reporting issues in GitHub workflows. The repository had over 19,000 stars and more than 1,500 forks in the 2026 GitHub API snapshot used for this batch.

### 使用方式

The normal package-manager workflow is to install `golangci-lint`, add a `.golangci.yml` or equivalent config to the repository, and run `golangci-lint run` locally or in CI. The project documents integrations for editors and shells as well as CI installation paths.

Its value comes from combining speed and policy. Teams can enable a curated set of linters, cache work between runs, use generated output formats for CI annotations, and keep Go lint rules close to the source tree in a checked-in config file.

### 为什么软件包爱好者会关心

For package nerds, golangci-lint is one of the canonical Go toolbox binaries: version-sensitive, CI-facing, heavily bottled, and commonly pinned in development environments. It is also a stress test for package ecosystems because it embeds many analyzers whose compatibility tracks Go releases.

It matters culturally because it made Go linting feel like installing one dependable command instead of assembling a personal pile of analyzer binaries. That is exactly the kind of tool Homebrew, Nix, Arch, and CI images tend to converge on.

### 时间线

- 2018: GitHub repository created for a fast Go linters runner.
- 2019: Changelog records Go 1.12 and Go 1.13 support, new linters, junit-xml output, bash completions, and improved auto-fixing.
- 2020: Dedicated website launched at `golangci-lint.run`; GitHub Actions output and additional linters added.
- 2025: v1.64.2 documented as the last minor v1 release before v2.
- 2025: v2 changelog begins with product changes including formatting support and separated v1/v2 documentation.

### Related projects

- The official `golangci-lint-action` runs golangci-lint in GitHub Actions.
- golangci-lint wraps and coordinates many Go analyzers, including tools from the Staticcheck and go/analysis ecosystem.
- golangci-lint-langserver and editor integrations adapt the CLI's diagnostics for local development.

### 来源

- <https://github.com/golangci/golangci-lint>
- <https://github.com/marketplace/actions/golangci-lint>
- <https://golangci-lint.run/docs/product/changelog-v1/>
- <https://golangci-lint.run/docs/product/changelog/>
- <https://golangci-lint.run/docs/welcome/install/>
- <https://golangci-lint.run/docs/welcome/integrations/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## 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: ./.golangci.yml, ./.golangci.yaml, ./.golangci.toml, ./.golangci.json, ~/.golangci.yml, ~/.golangci.yaml, ~/.golangci.toml, ~/.golangci.json
## 其他软件包管理器记录

- Nix - golangci-lint: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/golangci-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - golangci-lint - 2.12.2-r1: normalized package name match | Alpine Linux edge package indexes: golangci-lint from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast linters runner for Go | https://golangci-lint.run/
- apk - golangci-lint-bash-completion - 2.12.2-r1: normalized package name match | Alpine Linux edge package indexes: golangci-lint-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for golangci-lint | https://golangci-lint.run/
- apk - golangci-lint-fish-completion - 2.12.2-r1: normalized package name match | Alpine Linux edge package indexes: golangci-lint-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for golangci-lint | https://golangci-lint.run/
- apk - golangci-lint-zsh-completion - 2.12.2-r1: normalized package name match | Alpine Linux edge package indexes: golangci-lint-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for golangci-lint | https://golangci-lint.run/
- dnf - golangci-lint - 2.11.4-1.fc45: normalized package name match | Fedora Rawhide package metadata: golangci-lint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Fast linters runner for Go | https://github.com/golangci/golangci-lint
- pacman - golangci-lint - 2.12.2-1: normalized package name match | Arch Linux sync databases: golangci-lint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Fast linters runner for Go | https://github.com/golangci/golangci-lint
- zypper - golangci-lint - 2.12.2-1.4: normalized package name match | openSUSE Tumbleweed package metadata: golangci-lint from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A fast Go linters runner | https://golangci-lint.run
- MacPorts - golangci-lint: normalized package name match | MacPorts ports tree: devel/golangci-lint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - golangci-lint: normalized package name match | Chocolatey community package catalog: golangci-lint from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','gitextensions'
- Scoop - main/golangci-lint: normalized package name match | Scoop official bucket manifest trees: bucket/golangci-lint.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - GolangCI.golangci-lint: normalized package name match | Windows Package Manager source index: GolangCI.golangci-lint from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/golangci-lint.yml](https://github.com/mxcl/pkgdb/blob/main/combined/golangci-lint.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
