1+ # fork from gitea https://github.com/go-gitea/gitea/blob/main/.golangci.yml
2+ version : " 2"
3+ output :
4+ sort-order :
5+ - file
6+ linters :
7+ default : none
8+ enable :
9+ - bidichk
10+ - depguard
11+ - dupl
12+ - errcheck
13+ - forbidigo
14+ - gocritic
15+ - govet
16+ - ineffassign
17+ - mirror
18+ - nakedret
19+ - nolintlint
20+ - perfsprint
21+ - revive
22+ - staticcheck
23+ - testifylint
24+ - unconvert
25+ - unparam
26+ - unused
27+ - usestdlibvars
28+ - usetesting
29+ - wastedassign
30+ settings :
31+ depguard :
32+ rules :
33+ main :
34+ deny :
35+ - pkg : github.com/unknwon/com
36+ desc : use gitea's util and replacements
37+ - pkg : io/ioutil
38+ desc : use os or io instead
39+ - pkg : golang.org/x/exp
40+ desc : it's experimental and unreliable
41+ - pkg : code.gitea.io/gitea/modules/git/internal
42+ desc : do not use the internal package, use AddXxx function instead
43+ - pkg : gopkg.in/ini.v1
44+ desc : do not use the ini package, use gitea's config system instead
45+ - pkg : gitea.com/go-chi/cache
46+ desc : do not use the go-chi cache package, use gitea's cache system
47+ nolintlint :
48+ allow-unused : false
49+ require-explanation : true
50+ require-specific : true
51+ gocritic :
52+ enabled-checks :
53+ - equalFold
54+ disabled-checks :
55+ - ifElseChain
56+ - singleCaseSwitch # Every time this occurred in the code, there was no other way.
57+ revive :
58+ severity : error
59+ rules :
60+ - name : atomic
61+ - name : bare-return
62+ - name : blank-imports
63+ - name : constant-logical-expr
64+ - name : context-as-argument
65+ - name : context-keys-type
66+ - name : dot-imports
67+ - name : duplicated-imports
68+ - name : empty-lines
69+ - name : error-naming
70+ - name : error-return
71+ - name : error-strings
72+ - name : errorf
73+ - name : exported
74+ - name : identical-branches
75+ - name : if-return
76+ - name : increment-decrement
77+ - name : indent-error-flow
78+ - name : modifies-value-receiver
79+ - name : package-comments
80+ - name : range
81+ - name : receiver-naming
82+ - name : redefines-builtin-id
83+ - name : string-of-int
84+ - name : superfluous-else
85+ - name : time-naming
86+ - name : unconditional-recursion
87+ - name : unexported-return
88+ - name : unreachable-code
89+ - name : var-declaration
90+ - name : var-naming
91+ arguments :
92+ - [] # AllowList - do not remove as args for the rule are positional and won't work without lists first
93+ - [] # DenyList
94+ - - skip-package-name-checks : true # supress errors from underscore in migration packages
95+ staticcheck :
96+ checks :
97+ - all
98+ - -ST1003
99+ - -ST1005
100+ - -QF1001
101+ - -QF1006
102+ - -QF1008
103+ testifylint :
104+ disable :
105+ - go-require
106+ - require-error
107+ usetesting :
108+ os-temp-dir : true
109+ exclusions :
110+ generated : lax
111+ presets :
112+ - comments
113+ - common-false-positives
114+ - legacy
115+ - std-error-handling
116+ rules :
117+ - linters :
118+ - dupl
119+ - errcheck
120+ - gocyclo
121+ - gosec
122+ - staticcheck
123+ - unparam
124+ path : _test\.go
125+ - linters :
126+ - dupl
127+ - errcheck
128+ - gocyclo
129+ - gosec
130+ path : models/migrations/v
131+ - linters :
132+ - forbidigo
133+ path : cmd
134+ - linters :
135+ - dupl
136+ text : (?i)webhook
137+ - linters :
138+ - gocritic
139+ text : (?i)`ID' should not be capitalized
140+ - linters :
141+ - deadcode
142+ - unused
143+ text : (?i)swagger
144+ - linters :
145+ - staticcheck
146+ text : (?i)argument x is overwritten before first use
147+ - linters :
148+ - gocritic
149+ text : ' (?i)commentFormatting: put a space between `//` and comment text'
150+ - linters :
151+ - gocritic
152+ text : ' (?i)exitAfterDefer:'
153+ paths :
154+ - node_modules
155+ - .venv
156+ - public
157+ - web_src
158+ - third_party$
159+ - builtin$
160+ - examples$
161+ issues :
162+ max-issues-per-linter : 0
163+ max-same-issues : 0
164+ formatters :
165+ enable :
166+ - gofmt
167+ - gofumpt
168+ settings :
169+ gofumpt :
170+ extra-rules : true
171+ exclusions :
172+ generated : lax
173+ paths :
174+ - node_modules
175+ - .venv
176+ - public
177+ - web_src
178+ - third_party$
179+ - builtin$
180+ - examples$
181+
182+ run :
183+ timeout : 10m
0 commit comments