Skip to content

Commit

Permalink
Use an explicit list of linters
Browse files Browse the repository at this point in the history
Instead of an exclude list. This way the addition of new linters in golangci-lint does
not cause errors.
  • Loading branch information
dnephin committed Apr 19, 2020
1 parent 0f3ab42 commit 1dfd4a8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ workflows:
git config --global core.symlinks true
- go/lint:
golangci-lint-version: 1.21.0
golangci-lint-version: 1.24.0

- build
- run
Expand Down
54 changes: 29 additions & 25 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ linters-settings:
min-occurrences: 4
lll:
line-length: 120
gocritic:
enabled-tags:
- diagnostic
- performance
- style
- experimental
disabled-checks:
- importShadow
- paramTypeCombine
- commentFormatting # https://github.com/go-critic/go-critic/issues/755
- unnamedResult
settings:
hugeParam:
sizeThreshold: 256

issues:
exclude-use-default: false
Expand All @@ -29,14 +15,32 @@ issues:
- 'always receives'

linters:
enable-all: true
disable:
- dupl
- gochecknoglobals
- gochecknoinits
- gosec
- scopelint
- maligned
- godox
- wsl
- funlen
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- 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 1dfd4a8

Please sign in to comment.