Skip to content

Commit 4d542cf

Browse files
committed
chore: standardize golangci-lint config across org
1 parent e85e992 commit 4d542cf

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ linters:
1313
- staticcheck
1414
- unused
1515
settings:
16+
cyclop:
17+
max-complexity: 30
18+
package-average: 10
1619
depguard:
1720
rules:
1821
main:
@@ -21,15 +24,68 @@ linters:
2124
allow:
2225
- $gostd
2326
- github.com/bold-minds/each
27+
- github.com/stretchr/testify
2428
errcheck:
2529
check-type-assertions: true
30+
funlen:
31+
lines: 100
32+
statements: 50
33+
ignore-comments: true
34+
gocognit:
35+
min-complexity: 20
36+
gochecksumtype:
37+
default-signifies-exhaustive: false
38+
gocritic:
39+
settings:
40+
captLocal:
41+
paramsOnly: false
42+
underef:
43+
skipRecvDeref: false
2644
govet:
2745
disable:
2846
- fieldalignment
2947
enable-all: true
3048
settings:
3149
shadow:
3250
strict: true
51+
inamedparam:
52+
skip-single-param: true
53+
mnd:
54+
ignored-functions:
55+
- args.Error
56+
- flag.Arg
57+
- flag.Duration.*
58+
- flag.Float.*
59+
- flag.Int.*
60+
- flag.Uint.*
61+
- os.Chmod
62+
- os.Mkdir.*
63+
- os.OpenFile
64+
- os.WriteFile
65+
- prometheus.ExponentialBuckets.*
66+
- prometheus.LinearBuckets
67+
nakedret:
68+
max-func-lines: 0
69+
nolintlint:
70+
require-explanation: true
71+
require-specific: true
72+
allow-no-explanation:
73+
- funlen
74+
- gocognit
75+
- lll
76+
perfsprint:
77+
strconcat: false
78+
reassign:
79+
patterns:
80+
- .*
81+
rowserrcheck:
82+
packages:
83+
- github.com/jmoiron/sqlx
84+
sloglint:
85+
no-global: all
86+
context: scope
87+
usetesting:
88+
os-temp-dir: true
3389
exclusions:
3490
generated: lax
3591
presets:
@@ -57,6 +113,7 @@ linters:
57113
paths:
58114
- third_party$
59115
- builtin$
116+
- examples$
60117
issues:
61118
max-same-issues: 50
62119
formatters:
@@ -65,3 +122,4 @@ formatters:
65122
paths:
66123
- third_party$
67124
- builtin$
125+
- examples$

0 commit comments

Comments
 (0)