summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 23:05:39 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-29 02:14:51 -0700
commit67b6b99dde3d7a887a73df25b4cd885e8bdcf2de (patch)
treec4ec20d903bc61cc0d4a7445c74aca8a5a821b55
parent7896d7c7fe62955bbe5e9251fce016e2548794e8 (diff)
.golangci.yml: Turn on all passing linters
-rw-r--r--.golangci.yml71
1 files changed, 64 insertions, 7 deletions
diff --git a/.golangci.yml b/.golangci.yml
index fce8563..9e1a999 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -3,14 +3,71 @@
# SPDX-License-Identifier: GPL-2.0-or-later
linters:
+ enable-all: true
disable:
- - structcheck # doesn't support Go 1.18 yet
- enable:
- - gci
- - gofmt
- - gofumpt
- - gosec
- - nolintlint
+ # Deprecated
+ - deadcode # deprecated, replaced by 'unused'
+ - exhaustivestruct # deprecated, replaced by 'exhauststruct'
+ - golint # deprecated, replaced by 'revive'
+ - ifshort # deprecated
+ - interfacer # deprecated
+ - maligned # deprecated, replaced by 'govet fieldalignement'
+ - nosnakecase # deprecated, replaced by 'revive var-naming'
+ - scopelint # deprecated, replaced by 'exportloopref'
+ - structcheck # deprecated, replaced by 'unused'
+ - varcheck # deprecated, replaced by 'unused'
+
+ # Don't support Go 1.18 generics yet
+ - rowserrcheck
+ - sqlclosecheck
+ - wastedassign
+
+ # Style
+ - nlreturn
+ - nonamedreturns # I name returns for godoc purposes.
+ - tagliatelle
+ - wsl
+ - whitespace
+
+ # Complexity; sometimes code is just complex.
+ - cyclop
+ - funlen
+ - gocognit
+ - gocyclo
+ - maintidx
+ - nestif
+
+ # Miscellaneous
+ - asciicheck # it's fine to include Unicode
+ - godox # there are a few known TODOs, and that's OK
+ - goerr113 # forbids fmt.Errorf(%w), which is just silly
+
+ # These are disabled not because I think they're bad, but because
+ # they currently don't pass, and I haven't really evaluated them
+ # yet.
+ - dupl
+ - dupword
+ - errorlint
+ - exhaustive
+ - exhaustruct
+ - forcetypeassert
+ - gochecknoglobals
+ - gochecknoinits
+ - gocritic
+ - godot
+ - gomnd
+ - ireturn
+ - lll
+ - nakedret
+ - noctx
+ - paralleltest
+ - prealloc
+ - revive
+ - stylecheck
+ - testpackage
+ - thelper
+ - varnamelen
+ - wrapcheck
linters-settings:
gci:
sections: