1+ version : " 2"
2+
13linters :
4+ default : all
5+ disable :
6+ - wsl
7+ - wrapcheck
8+ - unqueryvet
9+ - testpackage
10+ - testifylint
11+ - modernize
12+ - funcorder
13+ - depguard
14+ - noinlineerr
15+ - nonamedreturns
16+
17+ settings :
18+ varnamelen :
19+ ignore-names :
20+ - tr
21+ - tx
22+ - t
23+ - xtx
24+ - sp
25+ - in
26+ - s
27+ - oo
28+ ignore-decls :
29+ - wg sync.WaitGroup
30+ - wg *sync.WaitGroup
31+ - db *gorm.DB
32+ - db redis.UniversalClient
33+ - m Manager
34+ wsl_v5 :
35+ default : all
36+ disable :
37+ - assign
38+ - assign-exclusive
39+ - assign-expr
40+ staticcheck :
41+ checks :
42+ - " all"
43+ - " -ST1000"
44+ - " -ST1003"
45+ - " -ST1016"
46+ - " -ST1020"
47+ - " -ST1021"
48+ - " -ST1022"
49+ - " -QF1008"
50+
51+ exclusions :
52+ generated : lax
53+
54+ paths :
55+ - trm/manager/mock
56+ - sql/mock
57+
58+ rules :
59+ - linters :
60+ - staticcheck
61+ text : ' ST1000:'
62+
63+ - linters :
64+ - lll
65+ source : ' ^//go:generate '
66+
67+ - linters :
68+ - lll
69+ source : ' (?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'' \\(\\)\\*\\+,;=.]+'
70+
71+ - linters :
72+ - lll
73+ source : ' // ?TODO '
74+
75+ - linters :
76+ - lll
77+ source : ' func \(r \*readonlyFuncWithoutTxDecorator\)'
78+
79+ - path : ' _test\.go'
80+ linters :
81+ - wsl_v5
82+ text : ' only cuddled expressions if assigning variable or using from line above'
83+
84+ - path : ' _test\.go'
85+ linters :
86+ - wsl_v5
87+ text : ' assignments should only be cuddled with other assignments'
88+
89+ - path : ' .*_test\.go'
90+ source : ' t\.Run\('
91+ linters :
92+ - wsl_v5
93+ text : ' missing whitespace above this line'
94+
95+ - path : ' _test\.go'
96+ linters :
97+ - revive
98+ text : ' seems to be unused, consider removing or renaming it as _'
99+
100+ - path : ' _test\.go'
101+ linters :
102+ - revive
103+ text : ' context-keys-type: should not use basic type string as key in context.WithValue'
104+
105+ - path : ' _test\.go'
106+ linters :
107+ - revive
108+ text : ' context-keys-type: should not use basic type untyped string as key in context.WithValue'
109+
110+ - path : ' _test\.go'
111+ linters :
112+ - staticcheck
113+ text : ' SA1029: should not use built-in type string as key for value; define your own type to avoid collisions'
114+
115+ - path : ' (.+/)?context\.go'
116+ linters :
117+ - ireturn
118+
119+ - path : ' (.+/)?transaction\.go'
120+ linters :
121+ - ireturn
122+ source : ' \) Begin\(ctx'
123+
124+ - path : ' (.+/)?settings\.go'
125+ linters :
126+ - ireturn
127+ source : ' (?:EnrichBy|SetPropagation|SetCtxKey|CtxKey|SetCancelable|SetTimeout)'
128+
129+ - linters :
130+ - gochecknoglobals
131+ source : ' DefaultCtxGetter'
132+
133+ - path : ' _test\.go'
134+ source : ' prepare: func\('
135+ text : ' test helper function should start from t.Helper()'
136+ linters :
137+ - thelper
138+
139+ - &internal_text
140+ path : ' (^trm/internal|^internal)'
141+ text : ' var-naming: don'' t use an underscore in package name'
142+
143+ - << : *internal_text
144+ text : ' package-comments: should have a package comment'
145+
146+ - << : *internal_text
147+ text : ' ST1003: should not use underscores in package names'
148+
149+ - path : ' (_test\.go|^trm/internal|^internal)'
150+ linters :
151+ - funlen
152+ - gochecknoglobals
153+ - goconst
154+ - gomnd
155+ - containedctx
156+ - err113
157+ - errcheck
158+ - nolintlint
159+ - forcetypeassert
160+ - exhaustruct
161+ - varnamelen
162+ - noinlineerr
163+ - cyclop
164+ - noctx
165+
166+ formatters :
2167 enable :
3- - asasalint
4- - bodyclose
5- - containedctx
6- - contextcheck
7- - dogsled
8- - dupl
9- - durationcheck
10- - errchkjson
11- - errname
12- - errorlint
13- - exhaustive
14- - exhaustruct
15- - forcetypeassert # https://github.com/gostaticanalysis/forcetypeassert#forcetypeassert
16- - funlen
17- - gochecknoglobals
18- - gochecknoinits
19- - gocognit
20- - goconst
21- - gocritic
22- - gocyclo
23- - godot
24- - err113
25168 - gofmt
26169 - gofumpt
27170 - goimports
28- - gomoddirectives
29- - goprintffuncname # https://github.com/jirfag/go-printf-func-name#go-printf-func-name
30- - grouper
31- - gosec
32- - importas
33- - interfacebloat
34- - ireturn
35- - lll
36- - makezero # https://github.com/ashanbrown/makezero#purpose
37- - misspell
38- - nakedret
39- - nestif
40- - nilerr # https://github.com/gostaticanalysis/nilerr#nilerr
41- - nilnil # https://github.com/Antonboom/nilnil#motivation
42- - nolintlint # https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint/README.md#purpose
43- - paralleltest
44- - prealloc # https://github.com/alexkohler/prealloc#purpose
45- - revive
46- - rowserrcheck
47- - sqlclosecheck
48- - stylecheck
49- - tagliatelle
50- - tparallel # https://github.com/moricho/tparallel
51- - unconvert # https://github.com/mdempsky/unconvert#usage
52- - unparam
53- - usestdlibvars
54- - wastedassign
55- - whitespace
56- - wsl # https://github.com/bombsimon/wsl/blob/master/doc/rules.md
57-
58- linters-settings :
59- wsl :
60- allow-assign-and-anything : true
61-
62- issues :
63- exclude-dirs :
64- - trm/manager/mock
65- - sql/mock
66- exclude-use-default : false
67- exclude :
68- - ST1000 # ST1000: at least one file in a package should have a package comment
69- exclude-rules :
70- - linters :
71- - lll
72- source : " ^//go:generate "
73- - linters :
74- - lll
75- source : " (?:http(s)?:\\ /\\ /)?[\\ w.-]+(?:\\ .[\\ w\\ .-]+)+[\\ w\\ -\\ ._~:/?#[\\ ]@!\\ $&'\\ (\\ )\\ *\\ +,;=.]+"
76- - linters :
77- - lll
78- source : " // ?TODO "
79- - path : _test\.go
80- linters :
81- - wsl
82- text : " only cuddled expressions if assigning variable or using from line above"
83- - path : _test\.go
84- linters :
85- - wsl
86- text : " assignments should only be cuddled with other assignments"
87- - path : _test\.go
88- linters :
89- - revive
90- text : " seems to be unused, consider removing or renaming it as _"
91- - path : _test\.go
92- linters :
93- - revive
94- text : " context-keys-type: should not use basic type string as key in context.WithValue"
95- - path : _test\.go
96- linters :
97- - revive
98- text : " context-keys-type: should not use basic type untyped string as key in context.WithValue"
99- - path : _test\.go
100- linters :
101- - staticcheck
102- text : " SA1029: should not use built-in type string as key for value; define your own type to avoid collisions"
103- - path : (.+/)?context\.go
104- linters :
105- - ireturn
106- - path : (.+/)?transaction\.go
107- linters :
108- - ireturn
109- source : \) Begin\(ctx
110- - path : (.+/)?settings\.go
111- linters :
112- - ireturn
113- source : " (?:EnrichBy|SetPropagation|SetCtxKey|CtxKey|SetCancelable|SetTimeout)"
114- - linters :
115- - gochecknoglobals
116- source : " DefaultCtxGetter"
117- - &internal_text
118- path : (^trm/internal|^internal)
119- text : " var-naming: don't use an underscore in package name"
120- - << : *internal_text
121- text : " package-comments: should have a package comment"
122- - << : *internal_text
123- text : " ST1003: should not use underscores in package names"
124- - path : (_test\.go|^trm/internal|^internal)
125- linters :
126- - funlen
127- - gochecknoglobals
128- - goconst
129- - gomnd
130- - containedctx
131- - err113
132- - errcheck
133- - nolintlint
134- - forcetypeassert
135- - exhaustruct
171+
172+ exclusions :
173+ paths :
174+ - trm/manager/mock
175+ - sql/mock
0 commit comments