id = "golangci-lint"
name = "golangci-lint"
homepage = "https://golangci-lint.run"
description = "Fast linters runner for Go."
executables = ["golangci-lint"]
[dotfiles]
paths = [
"~/.golangci.yml",
"~/.golangci.yaml",
"~/.golangci.toml",
"~/.golangci.json",
]
secret = []
side_effect = false
[commands]
format = 1
label = "golangci-lint"
description = "Lint Go code with golangci-lint run. Output format flags, formatters and cache commands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["run"]
label = "Lint the code"
description = "Run linters over Go packages. Pass --fix to apply automatic fixes in place."
[[commands.subcommand.source]]
id = "help"
kind = "help"
url = "https://github.com/golangci/golangci-lint/blob/main/docs/data/cli_help.json"
revision = "main 2026-10-27"
evidence = """
-c, --config PATH Read config from file path PATH
--no-config Don't read config file
--default string Default set of linters to enable (default "standard")
-D, --disable strings Disable specific linter
-E, --enable strings Enable specific linter
--enable-only strings Override linters configuration section to only run the specific linter(s)
--fast-only Filter enabled linters to run only fast linters
-j, --concurrency int Number of CPUs to use
--build-tags strings Build tags
--timeout duration Timeout for total work. Disabled by default
--tests Analyze tests (*_test.go) (default true)
-n, --new Show only new issues
--new-from-rev REV Show only new issues created after git revision REV
--fix Apply the fixes detected by the linters and formatters (if it's supported by the linter)
"""
[[commands.subcommand.field]]
id = "packages"
label = "Packages"
description = "Package patterns to lint."
type = "string"
position = 0
multiple = true
suggestions = [{ value = "./...", label = "All packages" }]
sources = ["help"]
[[commands.subcommand.field]]
id = "config"
label = "Config file"
type = "path"
option = ["--config", "-c"]
path = { kind = "file", role = "input" }
sources = ["help"]
[[commands.subcommand.field]]
id = "no_config"
label = "Ignore config file"
type = "boolean"
option = ["--no-config"]
sources = ["help"]
[[commands.subcommand.field]]
id = "enable"
label = "Enable linters"
type = "string"
option = ["--enable", "-E"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "disable"
label = "Disable linters"
type = "string"
option = ["--disable", "-D"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "enable_only"
label = "Only these linters"
type = "string"
option = ["--enable-only"]
multiple = true
sources = ["help"]
[[commands.subcommand.field]]
id = "fast_only"
label = "Fast linters only"
type = "boolean"
option = ["--fast-only"]
sources = ["help"]
[[commands.subcommand.field]]
id = "new"
label = "Only new issues"
type = "boolean"
option = ["--new", "-n"]
sources = ["help"]
[[commands.subcommand.field]]
id = "new_from_rev"
label = "New since revision"
type = "string"
option = ["--new-from-rev"]
sources = ["help"]
[[commands.subcommand.field]]
id = "fix"
label = "Apply fixes"
description = "Rewrites source files in place."
type = "boolean"
option = ["--fix"]
effect = "overwrite"
sources = ["help"]
[[commands.subcommand.field]]
id = "timeout"
label = "Timeout"
type = "string"
option = ["--timeout"]
suggestions = [{ value = "5m", label = "5 minutes" }]
sources = ["help"]
[[commands.subcommand.field]]
id = "build_tags"
label = "Build tags"
type = "string"
option = ["--build-tags"]
sources = ["help"]
[[commands.subcommand.task]]
id = "all"
label = "Lint everything"
set = { packages = ["./..."] }
fields = ["packages", "config", "enable", "disable", "timeout"]
required = []
[[commands.subcommand.task]]
id = "new-only"
label = "Only new issues"
set = { packages = ["./..."], new = [true] }
fields = ["packages", "new", "new_from_rev", "config"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["packages", "config", "enable", "disable", "new", "fix"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["no_config", "enable_only", "fast_only", "new_from_rev", "timeout", "build_tags"]