File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ require (
1212 github.com/BurntSushi/toml v1.3.0
1313 github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
1414 github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0
15+ github.com/OpenPeeDeeP/depguard/v2 v2.1.0
1516 github.com/alexkohler/nakedret/v2 v2.0.1
1617 github.com/alexkohler/prealloc v1.0.0
1718 github.com/alingse/asasalint v0.0.11
Original file line number Diff line number Diff line change 11package golinters
22
33import (
4- "github.com/golangci /depguard/v2"
4+ "github.com/OpenPeeDeeP /depguard/v2"
55 "golang.org/x/tools/go/analysis"
66
77 "github.com/golangci/golangci-lint/pkg/config"
@@ -33,19 +33,17 @@ func NewDepguard(settings *config.DepGuardSettings) *goanalysis.Linter {
3333 }
3434 }
3535
36- a := depguard .NewCoreAnalyzer (depguard. CoreSettings {} )
36+ a := depguard .NewUncompiledAnalyzer ( & conf )
3737
3838 return goanalysis .NewLinter (
39- a .Name ,
40- a .Doc ,
41- []* analysis.Analyzer {a },
39+ a .Analyzer . Name ,
40+ a .Analyzer . Doc ,
41+ []* analysis.Analyzer {a . Analyzer },
4242 nil ,
4343 ).WithContextSetter (func (lintCtx * linter.Context ) {
44- coreSettings , err := conf .Compile ()
44+ err := a .Compile ()
4545 if err != nil {
4646 lintCtx .Log .Errorf ("create analyzer: %v" , err )
4747 }
48-
49- a .Run = coreSettings .Run
5048 }).WithLoadMode (goanalysis .LoadModeSyntax )
5149}
You can’t perform that action at this time.
0 commit comments