@@ -5,6 +5,11 @@ linters:
55 enable :
66 - misspell
77 - revive
8+ - modernize # Modern Go patterns (NEW in v2.6.0)
9+ - gocritic # Comprehensive opinionated linter
10+ - gosec # Security-focused
11+ # godot linter disabled - too pedantic about comment punctuation
12+ - unconvert # Remove unnecessary conversions
813 settings :
914 errcheck :
1015 exclude-functions :
@@ -17,6 +22,24 @@ linters:
1722 - os.Remove
1823 - os.RemoveAll
1924 - os.WriteFile
25+ gocritic :
26+ disabled-checks :
27+ - ifElseChain # else-if chains are often clearer than switches
28+ - singleCaseSwitch # Single case switches can be intentional for consistency
29+ - appendAssign # Appending to different variable is often intentional
30+ - unlambda # Explicit lambdas can be clearer than direct function refs
31+ - elseif # else-if pattern is acceptable
32+ - assignOp # Long form assignment can be clearer
33+ - argOrder # False positives on string contains
34+ - dupBranchBody # Duplicate branches can be intentional for clarity
35+ gosec :
36+ excludes :
37+ - G101 # Ignore "Potential hardcoded credentials" - often false positives
38+ - G602 # Ignore "slice bounds check" - handled by runtime
39+ - G115 # Ignore "integer overflow conversion" - acceptable in most cases
40+ config :
41+ G204 : " 0644" # Allow common file permissions in tests
42+ G306 : " 0644" # Allow common file permissions
2043 exclusions :
2144 generated : lax
2245 presets :
@@ -46,6 +69,130 @@ linters:
4669 - linters :
4770 - revive
4871 text : exported
72+ - linters :
73+ - gosec
74+ text : " G204" # Allow exec.Command in controlled contexts
75+ path : pkg/awmg/gateway\.go
76+ - linters :
77+ - gosec
78+ text : " G204" # Allow docker commands in actionlint
79+ path : pkg/cli/actionlint\.go
80+ - linters :
81+ - gosec
82+ text : " G204" # Allow git commands in remote_fetch
83+ path : pkg/parser/remote_fetch\.go
84+ - linters :
85+ - gosec
86+ text : " G404" # Allow math/rand for non-crypto purposes
87+ path : pkg/cli/(add_command|update_git)\.go
88+ - linters :
89+ - gosec
90+ text : " G306" # Allow 0644 permissions in test files
91+ path : _test\.go
92+ - linters :
93+ - gosec
94+ text : " G305" # Allow file path operations in logs_download
95+ path : pkg/cli/logs_download\.go
96+ - linters :
97+ - gosec
98+ text : " G110" # Allow decompression in logs_download
99+ path : pkg/cli/logs_download\.go
100+ - linters :
101+ - gocritic
102+ text : " deprecatedComment" # Allow existing deprecated comment format
103+ - linters :
104+ - gocritic
105+ text : " commentFormatting" # Allow commented out code
106+ - linters :
107+ - gocritic
108+ text : " badCall" # filepath.Join with 1 arg is acceptable
109+ - linters :
110+ - godot
111+ path : _test\.go # Don't require periods in test comments
112+ - linters :
113+ - modernize
114+ text : " omitzero" # omitzero is acceptable for struct tags
115+ - linters :
116+ - modernize
117+ text : " mapsloop" # maps.Copy requires Go 1.21+, keep compatible
118+ - linters :
119+ - modernize
120+ text : " bloop" # b.Loop() is new, keep compatible with older Go
121+ - linters :
122+ - modernize
123+ text : " minmax" # min/max builtins are Go 1.21+, keep compatible
124+ - linters :
125+ - modernize
126+ text : " forvar" # Copying loop variable is sometimes clearer
127+ - linters :
128+ - modernize
129+ text : " plusbuild" # Keep build constraint for compatibility
130+ path : shell_backslash_integration_test\.go
131+ - linters :
132+ - modernize
133+ text : " any" # Keep interface{} for clarity in schema tests
134+ path : schema_strict_documentation_test\.go
135+ - linters :
136+ - modernize
137+ text : " any" # Keep interface{} for clarity in tests
138+ path : logs_awinfo_backward_compat_test\.go
139+ - linters :
140+ - modernize
141+ text : " rangeint" # Keep traditional loops for compatibility
142+ - linters :
143+ - modernize
144+ text : " stringsseq" # SplitSeq requires Go 1.23+, keep compatible
145+ - linters :
146+ - modernize
147+ text : " slicescontains" # slices.Contains requires Go 1.21+
148+ - linters :
149+ - modernize
150+ text : " stringscutprefix" # strings.Cut* requires Go 1.20+
151+ - linters :
152+ - modernize
153+ text : " stringsbuilder" # Minor optimization, acceptable pattern
154+ - linters :
155+ - modernize
156+ text : " reflecttypefor" # TypeFor requires Go 1.22+
157+ - linters :
158+ - unconvert
159+ path : _test\.go # Allow explicit conversions in tests for clarity
160+ - linters :
161+ - gosec
162+ text : " G204" # Allow git commands in download_workflow
163+ path : pkg/cli/download_workflow\.go
164+ - linters :
165+ - gosec
166+ text : " G204" # Allow exec.Command with config in mcp_inspect
167+ path : pkg/cli/mcp_inspect\.go
168+ - linters :
169+ - gosec
170+ text : " G204" # Allow exec.Command with config in mcp_inspect_mcp
171+ path : pkg/cli/mcp_inspect_mcp\.go
172+ - linters :
173+ - gosec
174+ text : " G306" # 0755 is correct permission for executable script
175+ path : pkg/cli/mcp_inspect\.go
176+ - linters :
177+ - gosec
178+ text : " G204" # Allow docker commands in poutine
179+ path : pkg/cli/poutine\.go
180+ - linters :
181+ - gosec
182+ text : " G204" # Allow node command in tests
183+ path : pkg/workflow/js_comments_test\.go
184+ - linters :
185+ - gosec
186+ text : " G204" # Allow npx command in integration tests
187+ path : pkg/workflow/playwright_mcp_integration_test\.go
188+ - linters :
189+ - gosec
190+ text : " G204" # Allow exec of binary in status tests
191+ path : pkg/cli/status_command_test\.go
192+ - linters :
193+ - gosec
194+ text : " G204" # Allow docker commands in zizmor
195+ path : pkg/cli/zizmor\.go
49196 paths :
50197 - third_party$
51198 - builtin$
0 commit comments