11# golangci-lint configuration file
22# Documentation: https://golangci-lint.run/usage/configuration/
33
4+ # Version of configuration format (required for v2.3.0+)
5+ version : " 2"
6+
47# Options for analysis running
58run :
69 timeout : 5m
1215
1316# Linters configuration
1417linters :
15- # Enable essential linters plus a few more useful ones
18+ # Enable essential linters
1619 enable :
1720 - dupl
1821 - goconst
@@ -24,83 +27,121 @@ linters:
2427 - whitespace
2528 - lll
2629
27- # Issues configuration
28- issues :
29- # Maximum issues count per one linter
30- max-issues-per-linter : 0
31-
32- # Maximum count of issues with the same text
33- max-same-issues : 0
34-
3530 # Exclude specific issues by linter and rule
36- exclude-rules :
37- # Exclude errcheck issues in UI components (false positives)
38- - path : internal/ui/
39- linters :
40- - errcheck
41-
42- # Exclude gosec issues in test files and scripts (intentional)
43- - path : test/
44- linters :
45- - gosec
46- - path : internal/scripts/
47- linters :
48- - gosec
49- - path : internal/vnc/
50- linters :
51- - gosec
52- - path : pkg/api/
53- linters :
54- - gosec
55-
56- # Exclude staticcheck issues in test files
57- - path : test/
58- linters :
59- - staticcheck
60-
61- # Exclude deprecated field warnings for now (we're working on migration)
62- - linters :
63- - staticcheck
64- text : " SA1019: .* is deprecated: legacy single-profile fields for migration"
65-
66- # Exclude potential nil pointer dereference in tests (acceptable for test code)
67- - linters :
68- - staticcheck
69- text : " SA5011: possible nil pointer dereference"
70- path : test/
71-
72- # Exclude hardcoded credentials in test files (acceptable for test code)
73- - linters :
74- - gosec
75- text : " G101: Potential hardcoded credentials"
76- path : test/
77-
78- # Exclude unused parameter warnings (interface compliance)
79- - linters :
80- - revive
81- text : " unused-parameter: parameter .* seems to be unused"
82-
83- # Exclude line length warnings (handled by gofumpt)
84- - linters :
85- - lll
86- text : " The line is .* characters long"
87-
88- # Exclude whitespace warnings (handled by gofumpt)
89- - linters :
90- - whitespace
91- text : " .*"
92-
93- # Exclude indent-error-flow warnings (common pattern)
94- - linters :
95- - revive
96- text : " indent-error-flow: if block ends with a return statement"
97-
98- # Exclude var-naming warnings for now (complex breaking changes)
99- - linters :
100- - revive
101- text : " var-naming:"
102-
103- # Exclude type stuttering warnings (complex breaking changes)
104- - linters :
105- - revive
106- text : " exported: type name will be used as"
31+ exclusions :
32+ rules :
33+ # Exclude errcheck issues in test files and UI components (false positives)
34+ - path : test/
35+ linters :
36+ - errcheck
37+ - path : internal/ui/
38+ linters :
39+ - errcheck
40+ - path : internal/vnc/
41+ linters :
42+ - errcheck
43+ - path : internal/config/
44+ linters :
45+ - errcheck
46+ - path : internal/logger/
47+ linters :
48+ - errcheck
49+
50+ # Exclude gosec issues in test files and scripts (intentional)
51+ - path : test/
52+ linters :
53+ - gosec
54+ - path : internal/scripts/
55+ linters :
56+ - gosec
57+ - path : internal/vnc/
58+ linters :
59+ - gosec
60+ - path : pkg/api/
61+ linters :
62+ - gosec
63+ - path : internal/ui/components/
64+ linters :
65+ - gosec
66+ - path : internal/logger/
67+ linters :
68+ - gosec
69+ - path : internal/config/
70+ linters :
71+ - gosec
72+
73+ # Exclude staticcheck issues in test files and style suggestions
74+ - path : test/
75+ linters :
76+ - staticcheck
77+ - linters :
78+ - staticcheck
79+ text : " QF1001: could apply De Morgan's law"
80+ - linters :
81+ - staticcheck
82+ text : " QF1003: could use tagged switch"
83+ - linters :
84+ - staticcheck
85+ text : " QF1008: could remove embedded field"
86+
87+ # Exclude deprecated field warnings for now (we're working on migration)
88+ - linters :
89+ - staticcheck
90+ text : " SA1019: .* is deprecated: legacy single-profile fields for migration"
91+
92+ # Exclude potential nil pointer dereference in tests (acceptable for test code)
93+ - linters :
94+ - staticcheck
95+ text : " SA5011: possible nil pointer dereference"
96+ path : test/
97+
98+ # Exclude hardcoded credentials in test files (acceptable for test code)
99+ - linters :
100+ - gosec
101+ text : " G101: Potential hardcoded credentials"
102+ path : test/
103+
104+ # Exclude unused parameter warnings (interface compliance)
105+ - linters :
106+ - revive
107+ text : " unused-parameter: parameter .* seems to be unused"
108+
109+ # Exclude line length warnings (handled by gofumpt)
110+ - linters :
111+ - lll
112+ text : " The line is .* characters long"
113+
114+ # Exclude whitespace warnings (handled by gofumpt)
115+ - linters :
116+ - whitespace
117+ text : " .*"
118+
119+ # Exclude indent-error-flow warnings (common pattern)
120+ - linters :
121+ - revive
122+ text : " indent-error-flow: if block ends with a return statement"
123+
124+ # Exclude var-naming warnings for now (complex breaking changes)
125+ - linters :
126+ - revive
127+ text : " var-naming:"
128+
129+ # Exclude type stuttering warnings (complex breaking changes)
130+ - linters :
131+ - revive
132+ text : " exported: type name will be used as"
133+
134+ # Exclude package comment warnings (not critical)
135+ - linters :
136+ - revive
137+ text : " package-comments: should have a package comment"
138+
139+ # Exclude exported const/type comment warnings (not critical)
140+ - linters :
141+ - revive
142+ text : " exported: exported .* should have comment"
143+
144+ # Exclude meaningless package name warnings
145+ - linters :
146+ - revive
147+ text : " var-naming: avoid meaningless package names"
0 commit comments