LinuxCommandLibrary

golangci-lint

Fast Go linter aggregator

TLDR

Run all linters

$ golangci-lint run
copy
Run specific linters
$ golangci-lint run --enable=[errcheck,govet]
copy
Run on specific path
$ golangci-lint run [./...]
copy
Show available linters
$ golangci-lint linters
copy
Generate config
$ golangci-lint config
copy

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community