Skip to content

Commit a52cf27

Browse files
committed
Minimize disabled linters
These are all happy with mctl and only some of them complain in ironlib. We should make ironlib pass these linters and its not too much of a chore. I had to bump dupl.threshold because it was complaining about "duplicate" code in NewConditionsClient and NewBomServiceClient. I don't agree, but also don't really want to drop dupl just yet so lets see if bumping works. This config won't apply right away to mctl but the changes needed are very minor/easy fixes that should definitely be committed. Its mostly gofumpt & gci (which are fixed by running golangci-lint run --fix) and some typos.
1 parent 1b40e13 commit a52cf27

File tree

1 file changed

+11
-52
lines changed

1 file changed

+11
-52
lines changed

.golangci.yml

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
linters-settings:
1010
dupl:
11-
threshold: 100
11+
threshold: 125
1212
goconst:
1313
min-len: 2
1414
min-occurrences: 2
@@ -37,95 +37,54 @@ linters-settings:
3737
linters:
3838
enable-all: true
3939
disable-all: false
40+
# Linters we don't like
41+
# Comments help explain why its disabled or point at ones we should not disable but will take a little work
42+
# If its not commented its likely because its just too annoying or we don't find useful
4043
disable:
41-
- asasalint
42-
- asciicheck
43-
- bidichk
44-
- containedctx
4544
- copyloopvar # requires go >=1.22
4645
- cyclop
4746
- deadcode # deprecated
48-
- decorder
4947
- depguard
50-
- dogsled
51-
- dupl
52-
- dupword
53-
- errname
54-
- execinquery
55-
- exhaustive
48+
- errname # maybe should be enabled
5649
- exhaustivestruct # deprecated
5750
- exhaustruct
5851
- forbidigo
59-
- forcetypeassert
6052
- funlen
61-
- gci
62-
- ginkgolinter
63-
- gocheckcompilerdirectives
6453
- gochecknoglobals
6554
- gochecknoinits
6655
- gocognit
6756
- goconst
6857
- godot
6958
- godox
70-
- gofumpt
71-
- goheader
7259
- golint # deprecated
7360
- gomnd
74-
- gomoddirectives
75-
- gomodguard
76-
- goprintffuncname
77-
- gosmopolitan
78-
- grouper
7961
- ifshort # deprecated
80-
- importas
8162
- inamedparam
8263
- interfacebloat
8364
- interfacer # deprecated
8465
- intrange # requires go >=1.22
85-
- ireturn
86-
- lll
87-
- loggercheck
88-
- maintidx
89-
- makezero
66+
- ireturn # should be enabled, ironlib needs some changes
67+
- lll # not previously enabled, ironlib and mctl both fail this
9068
- maligned # deprecated
91-
- mirror
92-
- musttag
93-
- nakedret
9469
- nestif
9570
- nilnil
9671
- nlreturn
9772
- nolintlint
98-
- nonamedreturns
73+
- nonamedreturns # should be enabled, probably
9974
- nosnakecase # deprecated
100-
- nosprintfhostport
10175
- paralleltest
10276
- perfsprint
103-
- predeclared
104-
- promlinter
105-
- protogetter
106-
- rowserrcheck
10777
- scopelint # deprecated
108-
- sloglint
109-
- spancheck
110-
- sqlclosecheck
11178
- structcheck # deprecated
112-
- tagalign
11379
- tagliatelle
114-
- tenv
115-
- testableexamples
116-
- testifylint
80+
- tenv # should be enabled
11781
- testpackage
118-
- thelper
119-
- tparallel
120-
- unconvert
121-
- unparam
122-
- usestdlibvars
82+
- testifylint # should be enabled
83+
- thelper # should be enabled
12384
- varcheck # deprecated
12485
- varnamelen
125-
- wastedassign
12686
- wrapcheck
12787
- wsl
128-
- zerologlint
12988

13089
issues:
13190
exclude-dirs:

0 commit comments

Comments
 (0)