File tree Expand file tree Collapse file tree 5 files changed +50
-21
lines changed Expand file tree Collapse file tree 5 files changed +50
-21
lines changed Original file line number Diff line number Diff line change 15
15
- uses : actions/checkout@v4
16
16
17
17
- name : golangci-lint
18
- uses : golangci/golangci-lint-action@v6
18
+ uses : golangci/golangci-lint-action@v7
19
19
with :
20
- version : v1.64.6
20
+ version : v2.0.2
21
21
22
22
- name : Go mod tidy
23
23
run : |
Original file line number Diff line number Diff line change 1
- run :
2
- timeout : 5m
3
-
4
- issues :
5
- exclude-files :
6
- - ' (.+)_test\.go'
7
- - ' internal/config/http_config.go'
8
- - ' internal/config/config.go'
1
+ version : " 2"
9
2
linters :
10
- disable-all : false
11
3
enable :
4
+ - asasalint
5
+ - asciicheck
6
+ - bidichk
12
7
- dogsled
13
8
- dupl
9
+ - durationcheck
10
+ - errchkjson
11
+ - errorlint
12
+ - exhaustive
13
+ - gocheckcompilerdirectives
14
+ - gochecksumtype
15
+ - gosec
16
+ - gosmopolitan
17
+ - loggercheck
18
+ - makezero
19
+ - nilnesserr
20
+ - protogetter
21
+ - reassign
22
+ - recvcheck
23
+ - spancheck
24
+ - testifylint
14
25
- whitespace
15
26
- wsl
27
+ - zerologlint
16
28
disable :
17
- - funlen
18
29
- bodyclose
19
30
- contextcheck
31
+ - funlen
32
+ - musttag
20
33
- nilerr
21
34
- noctx
22
35
- rowserrcheck
23
36
- sqlclosecheck
24
37
- unparam
25
- - musttag
26
- presets :
27
- - bugs
28
- - unused
29
- fast : false
38
+ exclusions :
39
+ generated : lax
40
+ presets :
41
+ - comments
42
+ - common-false-positives
43
+ - legacy
44
+ - std-error-handling
45
+ paths :
46
+ - (.+)_test\.go
47
+ - internal/config/http_config.go
48
+ - internal/config/config.go
49
+ - third_party$
50
+ - builtin$
51
+ - examples$
52
+ formatters :
53
+ exclusions :
54
+ generated : lax
55
+ paths :
56
+ - third_party$
57
+ - builtin$
58
+ - examples$
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ func (c *Config) BuildCommand() (cmd string) {
183
183
return
184
184
}
185
185
186
- func (c * Config ) Run (timeout time.Duration ) (err error , rc int , output string ) {
186
+ func (c * Config ) Run (timeout time.Duration ) (rc int , output string , err error ) {
187
187
if ! c .validated {
188
188
panic ("you need to call Validate() before Run()" )
189
189
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func TestConfig_Run_WithError(t *testing.T) {
59
59
err := c .Validate ()
60
60
assert .NoError (t , err )
61
61
62
- err , _ , _ = c .Run (1 * time .Second )
62
+ _ , _ , err = c .Run (1 * time .Second )
63
63
assert .Error (t , err )
64
64
assert .Contains (t , err .Error (), "dial tcp 192.0.2.11:" )
65
65
}
@@ -145,7 +145,7 @@ func runCheck(t *testing.T, c *Config) {
145
145
err := c .Validate ()
146
146
assert .NoError (t , err )
147
147
148
- err , rc , output := c .Run (DefaultTimeout )
148
+ rc , output , err := c .Run (DefaultTimeout )
149
149
assert .NoError (t , err )
150
150
assert .Equal (t , 0 , rc )
151
151
assert .Contains (t , output , "ConsoleHost" )
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func main() {
60
60
check .ExitRaw (check .Unknown , "could not validate parameters: " + err .Error ())
61
61
}
62
62
63
- err , rc , output := config .Run (time .Duration (plugin .Timeout ) * time .Second )
63
+ rc , output , err := config .Run (time .Duration (plugin .Timeout ) * time .Second )
64
64
if err != nil {
65
65
check .ExitRaw (check .Unknown , "execution failed: " + err .Error ())
66
66
}
You can’t perform that action at this time.
0 commit comments