File tree 4 files changed +36
-39
lines changed
4 files changed +36
-39
lines changed Original file line number Diff line number Diff line change 1
1
name : golangci-lint
2
+
2
3
on :
3
4
push :
4
5
branches :
5
6
- main
6
- - master
7
7
pull_request :
8
+ branches :
9
+ - main
8
10
9
11
permissions :
10
12
contents : read
11
13
12
14
env :
13
- GOLANGCI_LINT_VERSION : v1.61
15
+ GOLANGCI_LINT_VERSION : v2.0
14
16
CGO_ENABLED : 0
15
17
16
18
jobs :
35
37
git diff --exit-code go.sum
36
38
37
39
- name : golangci-lint
38
- uses : golangci/golangci-lint-action@v6
40
+ uses : golangci/golangci-lint-action@v7
39
41
with :
40
42
version : ${{ env.GOLANGCI_LINT_VERSION }}
Original file line number Diff line number Diff line change 1
1
name : Tests
2
+
2
3
on :
3
4
push :
4
5
branches :
5
6
- main
6
- - master
7
7
pull_request :
8
+ branches :
9
+ - main
8
10
9
11
permissions :
10
12
contents : read
Original file line number Diff line number Diff line change
1
+ version : " 2"
2
+
3
+ formatters :
4
+ enable :
5
+ - gci
6
+ - gofumpt
7
+
1
8
linters :
2
- disable-all : true
9
+ default : none
3
10
enable :
4
11
- asasalint
5
12
- asciicheck
6
13
- bidichk
7
14
- containedctx
8
15
- contextcheck
9
- # - copyloopvar
16
+ - copyloopvar
10
17
- cyclop
11
18
- dogsled
12
19
- dupl
@@ -19,7 +26,6 @@ linters:
19
26
- fatcontext
20
27
- forbidigo
21
28
- funlen
22
- - gci
23
29
- gocheckcompilerdirectives
24
30
- gochecknoglobals
25
31
- gochecknoinits
@@ -29,20 +35,16 @@ linters:
29
35
- gocyclo
30
36
- godot
31
37
- godox
32
- - gofmt
33
- - gofumpt
34
- - goimports
35
38
- gomoddirectives
36
39
- gomodguard
37
40
- goprintffuncname
38
41
- gosec
39
- - gosimple
40
42
- govet
41
43
- importas
42
44
- inamedparam
43
45
- ineffassign
44
46
- interfacebloat
45
- # - intrange
47
+ - intrange
46
48
- ireturn
47
49
- loggercheck
48
50
- maintidx
@@ -61,10 +63,8 @@ linters:
61
63
- reassign
62
64
- revive
63
65
- staticcheck
64
- - stylecheck
65
66
- tagalign
66
67
- tagliatelle
67
- - tenv
68
68
- testableexamples
69
69
- testifylint
70
70
- thelper
@@ -78,31 +78,23 @@ linters:
78
78
- wrapcheck
79
79
- wsl
80
80
81
- linters-settings :
82
- stylecheck :
83
- checks : ['*', '-ST1000']
84
- cyclop :
85
- max-complexity : 15
81
+ settings :
82
+ cyclop :
83
+ max-complexity : 15
84
+ staticcheck :
85
+ checks :
86
+ - ' *'
87
+ - -ST1000
88
+ exclusions :
89
+ warn-unused : true
90
+ presets :
91
+ - comments
92
+ rules :
93
+ - linters :
94
+ - gochecknoglobals
95
+ path : pkg/analyzer/analyzer.go
96
+ text : Analyzer is a global variable
86
97
87
98
issues :
88
- exclude-use-default : false
89
99
max-issues-per-linter : 0
90
100
max-same-issues : 0
91
- exclude-rules :
92
- - linters :
93
- - revive
94
- text : " package-comments: should have a package comment"
95
- - linters :
96
- - revive
97
- text : " exported: .+ should have comment or be unexported"
98
- - path : pkg/analyzer/analyzer.go
99
- linters :
100
- - gochecknoglobals
101
- text : " Analyzer is a global variable"
102
-
103
- output :
104
- show-stats : true
105
- sort-results : true
106
- sort-order :
107
- - linter
108
- - file
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ func run(pass *analysis.Pass) (interface{}, error) {
44
44
return
45
45
}
46
46
47
- if formatParamNames := params [len (params )- 2 ].Names ; len (formatParamNames ) == 0 || formatParamNames [len (formatParamNames )- 1 ].Name != "format" {
47
+ formatParamNames := params [len (params )- 2 ].Names
48
+ if len (formatParamNames ) == 0 || formatParamNames [len (formatParamNames )- 1 ].Name != "format" {
48
49
return
49
50
}
50
51
You can’t perform that action at this time.
0 commit comments