golangci-lint
Fast Go linter aggregator
TLDR
Run all linters
$ golangci-lint run
Run specific linters$ golangci-lint run --enable=[errcheck,govet]
Run on specific path$ golangci-lint run [./...]
Show available linters$ golangci-lint linters
Generate config$ golangci-lint config
SYNOPSIS
golangci-lint command [options]
DESCRIPTION
golangci-lint is a fast Go linter runner that aggregates dozens of linters into one tool. It provides parallel execution, result caching, and unified configuration for checking style, bugs, performance, and security issues.
Configuration via .golangci.yml enables project-specific rules and linter selection, replacing the need to run individual linters separately.
PARAMETERS
run
Run linters.linters
List available linters.config
Config management.--enable LINTERS
Enable specific linters.--disable LINTERS
Disable specific linters.-c FILE, --config FILE
Config file.--help
Display help information.
CONFIGURATION
.golangci.yml
Project-level configuration file for linter selection, rules, severity, and exclusions..golangci.yaml
Alternative YAML configuration file name.
CAVEATS
Many linters available. Configuration recommended. Can be slow on first run.
HISTORY
golangci-lint was created to provide a fast, unified interface for running multiple Go linters efficiently.
SEE ALSO
go-vet(1), staticcheck(1)
