Skip to content

Commit

Permalink
static analysis conf: remove deprecated linters, add nonamedreturns
Browse files Browse the repository at this point in the history
…, fix typo
  • Loading branch information
joonas-fi committed Dec 29, 2023
1 parent ec34a42 commit 29ea131
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ run:
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck # everything below this is in addition to enabled-by-default
- unused # everything below this is in addition to enabled-by-default

- goimports
- exportloopref # successor of "scopelint"
Expand All @@ -27,14 +24,15 @@ linters:
- predeclared
- gosec
- gocritic
- nonamedreturns

# These looked promising but weren't worth the trouble:
# - gomnd # too strict
# - tagliatelle # naming, not struct tag validness..

# full list available by running: $ golangci-lint linter
# full list available by running: $ golangci-lint linters

linters-settings:
gocritic:
disabled-checks:
- ifElseChain # false positives (some if-else chains with "short ifs" look more cumbersome rewritten)
- ifElseChain # false positives (some if-else chains with "short ifs" look more cumbersome rewritten)

0 comments on commit 29ea131

Please sign in to comment.