File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
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 
@@ -36,7 +37,6 @@ require (
3637	github.com/go-xmlfmt/xmlfmt  v1.1.2 
3738	github.com/gofrs/flock  v0.8.1 
3839	github.com/golangci/check  v0.0.0-20180506172741-cfe4005ccda2 
39- 	github.com/golangci/depguard/v2  v2.0.2-0.20230602133032-4f22f8585733 
4040	github.com/golangci/dupl  v0.0.0-20180902072040-3e9179ac440a 
4141	github.com/golangci/go-misc  v0.0.0-20220329215616-d24fe342adfe 
4242	github.com/golangci/gofmt  v0.0.0-20220901101216-f2edd75033f2 
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