1- version : 2
2-
31run :
42 timeout : 5m
53 tests : true
64
7- formatters :
8- enable :
9- - gofmt
10- - goimports
11- settings :
12- gofmt :
13- simplify : true
14- goimports :
15- local-prefixes :
16- - github.com/kevinelliott/agentpipe
17-
185linters :
196 enable :
207 - govet
@@ -30,124 +17,126 @@ linters:
3017 - gocyclo
3118 - gocognit
3219 - unused
33- settings :
34- govet :
35- enable :
36- - shadow
37- errcheck :
38- check-type-assertions : true
39- check-blank : false
40- dupl :
41- threshold : 100
42- gocyclo :
43- min-complexity : 15
44- gocognit :
45- min-complexity : 30
46- misspell :
47- locale : US
48- gosec :
49- excludes :
50- - G104 # Errors unhandled (we use errcheck for this)
51- - G204 # Subprocess launched with variable
52- - G304 # File path provided as taint input
53- - G301 # Expect directory permissions
54- exclusions :
55- rules :
56- # Exclude some linters from running on test files
57- - path : ' _test\.go'
58- linters :
59- - gosec
60- - dupl
61- - errcheck
62-
63- # Exclude exec.Command usage in adapters (G204)
64- - path : ' pkg/adapters/'
65- linters :
66- - gosec
67- text : " G204:"
68-
69- # Allow larger functions in main and cmd
70- - path : ' (cmd/|main\.go)'
71- linters :
72- - gocyclo
73- - gocognit
74-
75- # Allow complex TUI update functions
76- - path : ' pkg/tui/'
77- linters :
78- - gocognit
79- - gocyclo
80-
81- # Allow complex message processing in adapters
82- - path : ' pkg/adapters/'
83- linters :
84- - gocyclo
85- - gocognit
86-
87- # Allow complex orchestrator functions (retry logic, rate limiting)
88- - path : ' pkg/orchestrator/'
89- linters :
90- - gocyclo
91- - gocognit
92-
93- # Allow weak random number generator for agent selection (not security-sensitive)
94- - path : ' pkg/orchestrator/'
95- linters :
96- - gosec
97- text : " G404:"
98-
99- # Allow 0644 permissions for config files in init command
100- - path : ' cmd/init.go'
101- linters :
102- - gosec
103- text : " G306:"
104-
105- # Exclude specific errcheck/gosec cases where error handling is intentionally omitted
106- - path : ' internal/version/version.go'
107- linters :
108- - errcheck
109- - gosec
110- text : " fmt.Sscanf"
111-
112- - path : ' cmd/root.go'
113- linters :
114- - errcheck
115- - gosec
116- text : " cmd.Help"
117-
118- - path : ' internal/version/version.go'
119- linters :
120- - errcheck
121- text : " resp.Body.Close"
122-
123- - path : ' pkg/logger/logger.go'
124- linters :
125- - errcheck
126- text : " logFile.Close"
127-
128- # Allow intentional error ignoring in fmt.Fprint* calls
129- - linters :
130- - errcheck
131- text : " fmt.Fprint"
132-
133- # Exclude file operation security warnings (G304, G301)
134- - path : ' pkg/config/config.go'
135- linters :
136- - gosec
137- text : " G304"
138-
139- - path : ' pkg/logger/'
140- linters :
141- - gosec
142- text : " (G304|G301)"
143-
144- # Exclude staticcheck QF1003 suggestions (tagged switch)
145- - linters :
146- - staticcheck
147- text : " QF1003"
148-
149- output :
150- formats :
151- text :
152- path : stdout
153- colors : true
20+ - gofmt
21+ - goimports
22+
23+ linters-settings :
24+ govet :
25+ enable :
26+ - shadow
27+ errcheck :
28+ check-type-assertions : true
29+ check-blank : false
30+ dupl :
31+ threshold : 100
32+ gocyclo :
33+ min-complexity : 15
34+ gocognit :
35+ min-complexity : 30
36+ misspell :
37+ locale : US
38+ gosec :
39+ excludes :
40+ - G104 # Errors unhandled (we use errcheck for this)
41+ - G204 # Subprocess launched with variable
42+ - G304 # File path provided as taint input
43+ - G301 # Expect directory permissions
44+ gofmt :
45+ simplify : true
46+ goimports :
47+ local-prefixes : github.com/kevinelliott/agentpipe
48+
49+ issues :
50+ exclude-rules :
51+ # Exclude some linters from running on test files
52+ - path : ' _test\.go'
53+ linters :
54+ - gosec
55+ - dupl
56+ - errcheck
57+
58+ # Exclude exec.Command usage in adapters (G204)
59+ - path : ' pkg/adapters/'
60+ linters :
61+ - gosec
62+ text : " G204:"
63+
64+ # Allow larger functions in main and cmd
65+ - path : ' (cmd/|main\.go)'
66+ linters :
67+ - gocyclo
68+ - gocognit
69+
70+ # Allow complex TUI update functions
71+ - path : ' pkg/tui/'
72+ linters :
73+ - gocognit
74+ - gocyclo
75+
76+ # Allow complex message processing in adapters
77+ - path : ' pkg/adapters/'
78+ linters :
79+ - gocyclo
80+ - gocognit
81+
82+ # Allow complex orchestrator functions (retry logic, rate limiting)
83+ - path : ' pkg/orchestrator/'
84+ linters :
85+ - gocyclo
86+ - gocognit
87+
88+ # Allow weak random number generator for agent selection (not security-sensitive)
89+ - path : ' pkg/orchestrator/'
90+ linters :
91+ - gosec
92+ text : " G404:"
93+
94+ # Allow 0644 permissions for config files in init command
95+ - path : ' cmd/init.go'
96+ linters :
97+ - gosec
98+ text : " G306:"
99+
100+ # Exclude specific errcheck/gosec cases where error handling is intentionally omitted
101+ - path : ' internal/version/version.go'
102+ linters :
103+ - errcheck
104+ - gosec
105+ text : " fmt.Sscanf"
106+
107+ - path : ' cmd/root.go'
108+ linters :
109+ - errcheck
110+ - gosec
111+ text : " cmd.Help"
112+
113+ - path : ' internal/version/version.go'
114+ linters :
115+ - errcheck
116+ text : " resp.Body.Close"
117+
118+ - path : ' pkg/logger/logger.go'
119+ linters :
120+ - errcheck
121+ text : " logFile.Close"
122+
123+ # Allow intentional error ignoring in fmt.Fprint* calls
124+ - linters :
125+ - errcheck
126+ text : " fmt.Fprint"
127+
128+ # Exclude file operation security warnings (G304, G301)
129+ - path : ' pkg/config/config.go'
130+ linters :
131+ - gosec
132+ text : " G304"
133+
134+ - path : ' pkg/logger/'
135+ linters :
136+ - gosec
137+ text : " (G304|G301)"
138+
139+ # Exclude staticcheck QF1003 suggestions (tagged switch)
140+ - linters :
141+ - staticcheck
142+ text : " QF1003"
0 commit comments