Skip to content

Commit

Permalink
Update zerolint version
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Eikemeier <[email protected]>
  • Loading branch information
eikemeier committed Jul 15, 2024
1 parent 641f9bf commit ac2b9af
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ linters-settings:
type: "module"
settings:
excluded: []
basic: true
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add a file `.custom-gcl.yaml` to your source with
version: v1.59.1
plugins:
- module: fillmore-labs.com/zerolint-golangci-plugin
version: v0.0.1
version: v0.0.2
```
then run `golangci-lint custom`. You get an `custom-gcl` executable that can be configured in `.golangci.yaml`:
Expand All @@ -28,6 +28,7 @@ linters-settings:
zerolint:
type: "module"
settings:
basic: false
excluded: []
```

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.22.5

require (
fillmore-labs.com/zerolint v0.0.1
fillmore-labs.com/zerolint v0.0.2
github.com/golangci/plugin-module-register v0.1.1
golang.org/x/tools v0.23.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fillmore-labs.com/zerolint v0.0.1 h1:L9ON5l0fJfASINhtIt4xngwcStsp1zqFtO4nCtOCIpY=
fillmore-labs.com/zerolint v0.0.1/go.mod h1:HT5XckGjAEW+twhXtryNQzphPzHjCw5ccFZUqel3Kis=
fillmore-labs.com/zerolint v0.0.2 h1:Wgg5K92ENelyg6GqybOLdj4kn3fsXtQAPyNxOmcO//M=
fillmore-labs.com/zerolint v0.0.2/go.mod h1:HT5XckGjAEW+twhXtryNQzphPzHjCw5ccFZUqel3Kis=
github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c=
github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc=
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
Expand Down
3 changes: 2 additions & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func init() { //nolint:gochecknoinits

type Settings struct {
Excluded []string `json:"excluded"`
Basic bool `json:"basic"`
}

func New(settings any) (register.LinterPlugin, error) { //nolint:ireturn
Expand All @@ -38,7 +39,7 @@ func (p Plugin) BuildAnalyzers() ([]*analysis.Analyzer, error) {
excludes[ex] = struct{}{}
}

v := visitor.Visitor{Pass: pass, Excludes: excludes}
v := visitor.Visitor{Pass: pass, Excludes: excludes, Basic: p.settings.Basic}
v.Run()

return any(nil), nil
Expand Down

0 comments on commit ac2b9af

Please sign in to comment.