npx claudepluginhub jamesprial/prial-plugins --plugin golang-workflowThis skill uses the workspace's default tool permissions.
Meta-linter that runs multiple linters in parallel.
Sets up golangci-lint for Go projects with recommended linters (errcheck, goimports, revive, govet, staticcheck) for code quality and static analysis. Includes config, running instructions, and CI/CD integration.
Provides Go linting best practices and golangci-lint configuration, covering linter runs, .golangci.yml setup, nolint suppressions, output interpretation, and linter management.
Detects optimal method to run golangci-lint in Go repositories (scripts, Makefile, direct, install) and reports structured issue summary.
Share bugs, ideas, or general feedback.
Meta-linter that runs multiple linters in parallel.
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
golangci-lint run ./...
golangci-lint run --fix
# .golangci.yml
run:
timeout: 5m
tests: true
linters:
enable:
- gofmt
- govet
- staticcheck
- errcheck
- gosimple
- ineffassign
- unused
linters-settings:
errcheck:
check-blank: true
govet:
check-shadowing: true
linters:
enable:
- gofmt # Format check
- govet # Built-in analyzer
- staticcheck # Comprehensive checks
- errcheck # Unchecked errors
- gosimple # Simplification
- ineffassign # Ineffective assignments
- unused # Unused code
- revive # Fast configurable linter
- gocyclo # Cyclomatic complexity
- misspell # Spelling errors
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- text: "should have comment"
linters:
- revive
# GitHub Actions
golangci-lint run --out-format=github-actions
# GitLab CI
golangci-lint run --out-format=code-climate > gl-code-quality-report.json
// Bad
file.Close()
// Good
defer file.Close()
// Bad
for i, _ := range items
// Good
for i := range items
// Bad
result := compute()
result = other()
// Good
result := other()
run:
concurrency: 4
deadline: 5m
skip-dirs:
- vendor
- third_party