Skip to content

Commit

Permalink
Use an explicit enable list instead of disable list
Browse files Browse the repository at this point in the history
golangci-lint keeps adding new linters that are enabled by default. Many
of these linters are nonsense. Instead of having to keep excluding new linters
use an include list.
  • Loading branch information
dnephin committed Apr 10, 2020
1 parent 0c8beab commit 87317d0
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@ linters-settings:
min-occurrences: 10
lll:
line-length: 100
gocritic:
enabled-tags:
- diagnostic
- performance
- style
disabled-checks:
- builtinShadow
- commentFormatting # https://github.com/go-critic/go-critic/issues/755
- importShadow
- octalLiteral
- paramTypeCombine
- singleCaseSwitch
- unnamedResult
- wrapperFunc
settings:
hugeParam:
sizeThreshold: 256

issues:
exclude-use-default: false
Expand All @@ -46,15 +29,33 @@ issues:
linters: [bodyclose]

linters:
enable-all: true
disable:
- dupl
- gochecknoglobals
- gochecknoinits
- gosec
- scopelint
- maligned
- gocritic
- funlen
- godox
- wsl
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- gocognit
- goconst
- gocyclo
- gofmt
- goimports
- golint
- gosimple
- govet
- ineffassign
- interfacer
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace

0 comments on commit 87317d0

Please sign in to comment.