@@ -18,29 +18,25 @@ formatters:
1818linters :
1919 default : all
2020 disable :
21+ - cyclop # I prefer cognitive complexity
2122 - decorder # Don't care about this
2223 - dupl # Basically every table driven test ever triggers this
2324 - dupword # Messes with test cases more often than not
24- - err113 # Out of date
25+ - err113 # Opaque errors are fine
2526 - exhaustruct # No
2627 - forbidigo # Nothing to forbid
2728 - funlen # Bad metric for complexity
28- - ginkgolinter # I don't use whatever this is
29- - gochecknoglobals # Globals are fine sometimes, use common sense
30- - gocognit # Cmplexity with another name, don't need both
31- - gocyclo # cyclop does this instead
29+ - gocyclo # I prefer cognitive complexity
3230 - godox # "todo" and "fixme" comments are allowed
3331 - goheader # No need
3432 - gosmopolitan # No need
3533 - grouper # Imports take care of themselves, rest is common sense
36- - ireturn # This is just not necessary or practical in a real codebase
34+ - ireturn # Returning an interface is sometimes a good abstraction
3735 - lll # Auto formatters do this and what they can't do I don't care about
38- - maintidx # This is just the inverse of complexity... which is cyclop
39- - nestif # cyclop does this
40- - nlreturn # Similar to wsl, I think best left to judgement
36+ - nlreturn # Similar to wsl
4137 - noinlineerr # Inline errors are fine
42- - nonamedreturns # Named returns are often helpful, it's naked returns that are the issue
43- - paralleltest # I've never had Go tests take longer than a few seconds, it's fine
38+ - nonamedreturns # Used sparingly in short functions these are fine
39+ - paralleltest # This makes go test -v ./... much more difficult to read
4440 - thelper # Lots of false positives in here due to the way I do table tests
4541 - unparam # gopls is better and more subtle
4642 - varnamelen # Lots of false positives of things that are fine
@@ -57,6 +53,8 @@ linters:
5753 linters :
5854 - prealloc # These kinds of optimisations will make no difference to test code
5955 - gosec # Tests don't need security stuff
56+ - gochecknoglobals # e.g. global test flags
57+ - maintidx # Flags table driven tests
6058
6159 settings :
6260 cyclop :
0 commit comments