File tree Expand file tree Collapse file tree 6 files changed +25
-39
lines changed Expand file tree Collapse file tree 6 files changed +25
-39
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- version : v1.62.0
2
+ version : v1.63.4
3
3
plugins :
4
4
- module : fillmore-labs.com/zerolint-golangci-plugin
5
5
path : .
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ name: Test
9
9
- main
10
10
jobs :
11
11
test :
12
- name : Test on Go ${{ matrix.go }}
12
+ name : Test on Go ${{ matrix.go-version }}
13
13
permissions :
14
14
checks : write
15
15
contents : read
@@ -18,21 +18,20 @@ jobs:
18
18
runs-on : ubuntu-24.04
19
19
strategy :
20
20
matrix :
21
- go : ["1.23. 3", "1.22.9 "]
21
+ go-version : ["1.24.0-rc. 3", "1.23.6", "1. 22.12 "]
22
22
env :
23
23
GOTOOLCHAIN : local
24
24
steps :
25
25
- name : ✔ Check out
26
26
uses : actions/checkout@v4
27
- - name : 🐹 Set up Go ${{ matrix.go }}
27
+ - name : 🐹 Set up Go ${{ matrix.go-version }}
28
28
uses : actions/setup-go@v5
29
29
with :
30
- go-version : ${{ matrix.go }}
31
- check-latest : true
30
+ go-version : ${{ matrix.go-version }}
32
31
- name : 🧸 golangci-lint
33
32
uses : golangci/golangci-lint-action@v6
34
33
with :
35
- version : v1.62.0
34
+ version : v1.63.4
36
35
args : --config=.golangci-default.yaml
37
36
- name : 🔨 Test
38
37
run : golangci-lint custom -v && ./custom-gcl run -v .
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ Add a file `.custom-gcl.yaml` to your source with
10
10
11
11
``` YAML
12
12
---
13
- version : v1.62.0
13
+ version : v1.63.4
14
14
plugins :
15
15
- module : fillmore-labs.com/zerolint-golangci-plugin
16
- version : v0.0.6
16
+ version : v0.0.7
17
17
` ` `
18
18
19
19
then run ` golangci-lint custom`. You get an `custom-gcl` executable that can be configured in `.golangci.yaml`:
Original file line number Diff line number Diff line change 1
1
module fillmore-labs.com/zerolint-golangci-plugin
2
2
3
- go 1.22.9
3
+ go 1.22.0
4
4
5
- toolchain go1.23.3
5
+ toolchain go1.23.6
6
6
7
7
require (
8
- fillmore-labs.com/zerolint v0.0.6
8
+ fillmore-labs.com/zerolint v0.0.7
9
9
github.com/golangci/plugin-module-register v0.1.1
10
- golang.org/x/tools v0.27 .0
10
+ golang.org/x/tools v0.29 .0
11
11
)
Original file line number Diff line number Diff line change 1
- fillmore-labs.com/zerolint v0.0.6 h1:pFGSYnXtnpMuzo5NxJ1IDMaOA3DZuijL1IJm1h1l/yY =
2
- fillmore-labs.com/zerolint v0.0.6 /go.mod h1:bX+KNByQeomQ6eDFkfw+OORPA1J4UIN1pSdPZz0wo9M =
1
+ fillmore-labs.com/zerolint v0.0.7 h1:ffxijMuW4Zm2550MFbWEwVBYavpOyANIWBpfnXJxmMM =
2
+ fillmore-labs.com/zerolint v0.0.7 /go.mod h1:+qGQ3b6Fp26aWFFU0OXPyEeUrUuD6zXleM7aaS4ZzSE =
3
3
github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c =
4
4
github.com/golangci/plugin-module-register v0.1.1 /go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc =
5
- golang.org/x/mod v0.22 .0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4 =
6
- golang.org/x/mod v0.22 .0 /go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY =
7
- golang.org/x/sync v0.9 .0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ =
8
- golang.org/x/sync v0.9 .0 /go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk =
9
- golang.org/x/tools v0.27 .0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o =
10
- golang.org/x/tools v0.27 .0 /go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q =
5
+ golang.org/x/mod v0.23 .0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM =
6
+ golang.org/x/mod v0.23 .0 /go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY =
7
+ golang.org/x/sync v0.11 .0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w =
8
+ golang.org/x/sync v0.11 .0 /go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk =
9
+ golang.org/x/tools v0.29 .0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE =
10
+ golang.org/x/tools v0.29 .0 /go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588 =
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package plugin
2
2
3
3
import (
4
4
"fillmore-labs.com/zerolint/pkg/analyzer"
5
- "fillmore-labs.com/zerolint/pkg/visitor"
6
5
"github.com/golangci/plugin-module-register/register"
7
6
"golang.org/x/tools/go/analysis"
8
7
"golang.org/x/tools/go/analysis/passes/inspect"
@@ -33,23 +32,11 @@ type Plugin struct {
33
32
}
34
33
35
34
func (p Plugin ) BuildAnalyzers () ([]* analysis.Analyzer , error ) {
36
- run := func (pass * analysis.Pass ) (any , error ) {
37
- excludes := make (map [string ]struct {}, len (p .settings .Excluded ))
38
- for _ , ex := range p .settings .Excluded {
39
- excludes [ex ] = struct {}{}
40
- }
41
-
42
- v := visitor.Run {
43
- Visitor : visitor.Visitor {
44
- Pass : pass ,
45
- Excludes : excludes ,
46
- },
47
- Basic : p .settings .Basic ,
48
- }
49
- v .Run ()
50
-
51
- return any (nil ), nil
52
- }
35
+ run := analyzer .NewRun (
36
+ analyzer .WithExcludes (p .settings .Excluded ),
37
+ analyzer .WithBasic (p .settings .Basic ),
38
+ analyzer .WithGenerated (true ),
39
+ )
53
40
54
41
analyzer := & analysis.Analyzer {
55
42
Name : Name ,
You can’t perform that action at this time.
0 commit comments