Lint every Go repository with one shared configuration and version, reporting only what a change brings
This commit is contained in:
commit
89089b1e2f
3 files changed
+193
No files matched your search
@@ -0,0 +1,90 @@
|
||||
version: "2"
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
|
||||
linters:
|
||||
default: standard
|
||||
enable:
|
||||
# Baseline & Core Analyzers
|
||||
- errcheck
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- unused
|
||||
- unconvert
|
||||
- unparam
|
||||
- misspell
|
||||
|
||||
# Error Handling & Precision
|
||||
- errorlint
|
||||
- nilerr
|
||||
|
||||
# Concurrency & Context
|
||||
- contextcheck
|
||||
- durationcheck
|
||||
- noctx
|
||||
|
||||
# Diagnostics & Code Quality
|
||||
- gocritic
|
||||
- copyloopvar
|
||||
- prealloc
|
||||
- revive
|
||||
|
||||
exclusions:
|
||||
rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- unparam
|
||||
- errcheck
|
||||
- contextcheck
|
||||
- gocritic
|
||||
- revive
|
||||
- noctx
|
||||
- govet
|
||||
- errorlint
|
||||
- prealloc
|
||||
|
||||
settings:
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
check-blank: false
|
||||
govet:
|
||||
enable:
|
||||
- shadow
|
||||
- nilness
|
||||
- unusedwrite
|
||||
errorlint:
|
||||
errorf: true
|
||||
asserts: true
|
||||
comparison: true
|
||||
misspell:
|
||||
ignore-rules:
|
||||
- marginable
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- performance
|
||||
disabled-checks:
|
||||
- commentFormatting
|
||||
- hugeParam
|
||||
- commentedOutCode
|
||||
- captLocal
|
||||
- assignOp
|
||||
- rangeValCopy
|
||||
- unnecessaryDefer
|
||||
- sloppyReassign
|
||||
revive:
|
||||
rules:
|
||||
- name: exported
|
||||
disabled: true
|
||||
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
|
||||
issues:
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
Reference in new issue
Block a user