# go-critic を Homebrew, MacPorts, Nix でインストール

go-critic のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:go-critic
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install go-critic
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install go-critic
```

  証拠: MacPorts ports tree: devel/go-critic/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#go-critic
```

  証拠: nixpkgs package indexes: pkgs/by-name/go/go-critic/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:go-critic
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.14.4
- **ソース概要:** Opinionated Go source code linter
- **ホームページ:** <https://go-critic.com>
- **リポジトリ:** <https://github.com/go-critic/go-critic>
- **最終更新:** 2026-07-29T16:05:03+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- go-critic (エイリアス)
- gocritic (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.14.4
## プロジェクトの歴史と使われ方

go-critic is an opinionated static-analysis linter for Go source code. It collects diagnostics, style checks, performance checks, and experimental rules that are often missing from smaller, single-purpose Go linters.

### プロジェクトの歴史

The go-critic repository was created in 2018 and the project was announced that year as both a linter and a sandbox for prototyping static-analysis ideas. Its documentation describes project goals around providing useful checks, proving check implementations before proposing them elsewhere, and keeping useful checks that lack a better home.

### 採用の歴史

go-critic became part of the broader Go linting ecosystem through direct CLI use and through golangci-lint, whose go-critic entry exposes it as `gocritic`. The repository README tells most users that using go-critic under golangci-lint is enough, reflecting its role as a specialized checker set inside larger lint pipelines.

### 使われ方

Practitioners run `go-critic check` against packages, directories, or files, enabling and disabling individual checks or tag groups such as diagnostic, style, performance, experimental, opinionated, and security. The CLI also includes `doc` for checker documentation and checker-specific parameters, which makes it useful both as a standalone audit tool and as a source of extra rules in CI.

### パッケージ好きにとっての重要性

For package catalogs, go-critic represents the Go ecosystem's preference for composable command-line analyzers. It can be installed as a small binary, run directly, or consumed by a linter runner, which lets distributions package it without owning editor or CI integration logic.

### タイムライン

- 2018: The GitHub repository was created and the linter was announced.
- 2019: v0.3.4 and v0.4.0 releases appeared on GitHub.
- 2020: v0.4.x releases continued the checker-set expansion.
- 2026: v0.14.x releases documented continued maintenance.

### Related projects

- golangci-lint
- ruleguard
- go vet
- staticcheck

### ソース

- <https://github.com/go-critic/go-critic>
- <https://github.com/go-critic/go-critic/releases>
- <https://go-critic.com/>
- <https://go-critic.com/overview.html>
- <https://golangci-lint.run/docs/product/thanks/>


## セキュリティノート

library-like package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- library-like package without higher-risk signals

## 他のパッケージマネージャ記録

- Nix - go-critic: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/go-critic/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - go-critic: normalized package name match | MacPorts ports tree: devel/go-critic/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## ソース

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