.golangci.yml RawHistoryFolder
1version: "2"
2
3linters:
4 default: none
5 enable:
6 - bodyclose
7 - copyloopvar
8 - dogsled
9 - dupl
10 - errcheck
11 - errorlint
12 - funlen
13 - gocheckcompilerdirectives
14 - goconst
15 - gocritic
16 - gocyclo
17 # - godox # TODOs/FIXMEs are intentional markers
18 - mnd
19 - goprintffuncname
20 - gosec
21 - govet
22 - ineffassign
23 - lll
24 - misspell
25 - nakedret
26 - nolintlint
27 - revive
28 - staticcheck
29 - testifylint
30 - unconvert
31 - unparam
32 - unused
33 - whitespace
34
35 settings:
36 dupl:
37 threshold: 150
38 funlen:
39 lines: -1
40 statements: 50
41 goconst:
42 min-len: 2
43 min-occurrences: 20
44 ignore-string-values:
45 - "^(bool|int|string|error|engine\\.webkit|>=0)$"
46 gocritic:
47 enabled-tags:
48 - diagnostic
49 - experimental
50 - opinionated
51 - performance
52 - style
53 disabled-checks:
54 - dupImport
55 - ifElseChain
56 - octalLiteral
57 - whyNoLint
58 - unnamedResult
59 - hugeParam
60 - singleCaseSwitch
61 gocyclo:
62 min-complexity: 20
63 mnd:
64 checks:
65 - argument
66 - case
67 - condition
68 - return
69 ignored-numbers:
70 - '0'
71 - '1'
72 - '2'
73 - '3'
74 - '4'
75 - '5'
76 - '10'
77 - '16'
78 - '32'
79 - '64'
80 - '100'
81 - '1000'
82 ignored-functions:
83 - strings.SplitN
84 - make
85 - time.Sleep
86 - time.Duration
87 - strconv.ParseInt
88 - strconv.ParseUint
89 - strconv.ParseFloat
90 govet:
91 enable:
92 - nilness
93 - shadow
94 errorlint:
95 asserts: false
96 lll:
97 line-length: 140
98 misspell:
99 locale: US
100 nolintlint:
101 allow-unused: false
102 require-explanation: true
103 require-specific: true
104 revive:
105 rules:
106 - name: indent-error-flow
107 - name: unused-parameter
108 - name: unused-receiver
109
110 exclusions:
111 generated: lax
112 paths:
113 - vendor
114 rules:
115 # Test files get relaxed rules
116 - path: _test\.go
117 linters:
118 - dupl
119 - mnd
120 - lll
121 - funlen
122 - goconst
123 - errcheck
124 - gosec
125 # Generated SQL code
126 - path: internal/db/.*\.sql\.go
127 linters:
128 - all
129 - path: internal/db/models\.go
130 linters:
131 - unused
132 # gosec false positives
133 - text: "G115:"
134 linters:
135 - gosec
136 - text: "G404:"
137 linters:
138 - gosec
139 - text: "G301:"
140 linters:
141 - gosec
142 - text: "G302:"
143 linters:
144 - gosec
145 - text: "G306:"
146 linters:
147 - gosec
148 - text: "G204:"
149 linters:
150 - gosec
151 # CEF/OpenGL interop requires unsafe pointer arithmetic
152 - path: internal/infrastructure/cef/
153 text: "G103:"
154 linters:
155 - gosec
156 - text: "G304:"
157 linters:
158 - gosec
159 - path: internal/bootstrap/session\.go
160 text: "G703:"
161 linters:
162 - gosec
163 - path: internal/infrastructure/updater/github\.go
164 text: "G704:"
165 linters:
166 - gosec
167 # GTK callbacks require unused parameters
168 - path: internal/ui/
169 text: "unused-parameter"
170 linters:
171 - revive
172 - path: internal/ui/
173 text: "unused-receiver"
174 linters:
175 - revive
176 # Adapter structs intentionally keep receivers for interface compliance
177 - path: internal/infrastructure/.*adapter\.go
178 text: "unused-receiver"
179 linters:
180 - revive
181 # CEF handler/stub methods must keep receivers for interface compliance
182 - path: internal/infrastructure/cef/
183 text: "unused-receiver"
184 linters:
185 - revive
186
187run:
188 timeout: 20m
189 modules-download-mode: readonly
190 build-tags:
191 - webkit_cgo