← Back to list

golangci-lint
by JamesPrial
WIP - collection of various Claude stuff i make/use/have_Claude_hallucinate
⭐ 2🍴 0📅 Jan 23, 2026
SKILL.md
name: golangci-lint description: Configure and run golangci-lint
golangci-lint
Meta-linter that runs multiple linters in parallel.
Install
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
Usage
golangci-lint run
golangci-lint run ./...
golangci-lint run --fix
Basic Configuration
# .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
Recommended Linters
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
Exclude Patterns
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- text: "should have comment"
linters:
- revive
CI Integration
# GitHub Actions
golangci-lint run --out-format=github-actions
# GitLab CI
golangci-lint run --out-format=code-climate > gl-code-quality-report.json
Common Fixes
errcheck: Unchecked Error
// Bad
file.Close()
// Good
defer file.Close()
gosimple: Redundant Code
// Bad
for i, _ := range items
// Good
for i := range items
ineffassign: Ineffective Assignment
// Bad
result := compute()
result = other()
// Good
result := other()
Performance Tuning
run:
concurrency: 4
deadline: 5m
skip-dirs:
- vendor
- third_party
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
