| name | go-lint |
| description | Lint and format Go code via golangci-lint. Use when asked to lint code, fix lint errors, or check code quality. |
| allowed-tools | ["shell"] |
| metadata | {"short-description":"Lint Go code with golangci-lint"} |
Go Linter
Reference: ~/.config/agent/domain/coding/go/tooling.md for Go linting details
Instructions
Lint Go code using golangci-lint per AGENT.md guidelines:
Standard Lint (with auto-fix)
golangci-lint run --new-false --fix ${ARGUMENTS}
Default to ./... if no package path is provided.
Lint Only (no fixes)
If user wants to see issues without applying fixes:
golangci-lint run --new-false ${ARGUMENTS}
Lint Flags
--new-false: Deprecated syntax for --new=false (show all issues)
--fix: Automatically fix issues where possible
- Path defaults to
./... (all packages)
Common Usage
golangci-lint run --new-false --fix ./...
golangci-lint run --new-false --fix ./path/to/package
golangci-lint run --new-false ./...
Arguments
Target package(s): ${ARGUMENTS:-./...}