Skip to content

Commit c56af47

Browse files
committed
Update zerolint version
Signed-off-by: Oliver Eikemeier <[email protected]>
1 parent b82162d commit c56af47

File tree

6 files changed

+25
-39
lines changed

6 files changed

+25
-39
lines changed

.custom-gcl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: v1.62.0
2+
version: v1.63.4
33
plugins:
44
- module: fillmore-labs.com/zerolint-golangci-plugin
55
path: .

.github/workflows/test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Test
99
- main
1010
jobs:
1111
test:
12-
name: Test on Go ${{ matrix.go }}
12+
name: Test on Go ${{ matrix.go-version }}
1313
permissions:
1414
checks: write
1515
contents: read
@@ -18,21 +18,20 @@ jobs:
1818
runs-on: ubuntu-24.04
1919
strategy:
2020
matrix:
21-
go: ["1.23.3", "1.22.9"]
21+
go-version: ["1.24.0-rc.3", "1.23.6", "1.22.12"]
2222
env:
2323
GOTOOLCHAIN: local
2424
steps:
2525
- name: ✔ Check out
2626
uses: actions/checkout@v4
27-
- name: 🐹 Set up Go ${{ matrix.go }}
27+
- name: 🐹 Set up Go ${{ matrix.go-version }}
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: ${{ matrix.go }}
31-
check-latest: true
30+
go-version: ${{ matrix.go-version }}
3231
- name: 🧸 golangci-lint
3332
uses: golangci/golangci-lint-action@v6
3433
with:
35-
version: v1.62.0
34+
version: v1.63.4
3635
args: --config=.golangci-default.yaml
3736
- name: 🔨 Test
3837
run: golangci-lint custom -v && ./custom-gcl run -v .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Add a file `.custom-gcl.yaml` to your source with
1010

1111
```YAML
1212
---
13-
version: v1.62.0
13+
version: v1.63.4
1414
plugins:
1515
- module: fillmore-labs.com/zerolint-golangci-plugin
16-
version: v0.0.6
16+
version: v0.0.7
1717
```
1818
1919
then run `golangci-lint custom`. You get an `custom-gcl` executable that can be configured in `.golangci.yaml`:

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module fillmore-labs.com/zerolint-golangci-plugin
22

3-
go 1.22.9
3+
go 1.22.0
44

5-
toolchain go1.23.3
5+
toolchain go1.23.6
66

77
require (
8-
fillmore-labs.com/zerolint v0.0.6
8+
fillmore-labs.com/zerolint v0.0.7
99
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
1111
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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=
33
github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c=
44
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=

plugin.go

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package plugin
22

33
import (
44
"fillmore-labs.com/zerolint/pkg/analyzer"
5-
"fillmore-labs.com/zerolint/pkg/visitor"
65
"github.com/golangci/plugin-module-register/register"
76
"golang.org/x/tools/go/analysis"
87
"golang.org/x/tools/go/analysis/passes/inspect"
@@ -33,23 +32,11 @@ type Plugin struct {
3332
}
3433

3534
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+
)
5340

5441
analyzer := &analysis.Analyzer{
5542
Name: Name,

0 commit comments

Comments
 (0)