File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -63,25 +63,19 @@ func runUnused(pass *analysis.Pass) ([]goanalysis.Issue, error) {
6363 return nil , err
6464 }
6565
66- sr := unused .Serialize (pass , res .(unused.Result ), pass .Fset )
67-
6866 used := make (map [string ]bool )
69- for _ , obj := range sr .Used {
67+ for _ , obj := range res .(unused. Result ) .Used {
7068 used [fmt .Sprintf ("%s %d %s" , obj .Position .Filename , obj .Position .Line , obj .Name )] = true
7169 }
7270
7371 var issues []goanalysis.Issue
7472
7573 // Inspired by https://github.com/dominikh/go-tools/blob/d694aadcb1f50c2d8ac0a1dd06217ebb9f654764/lintcmd/lint.go#L177-L197
76- for _ , object := range sr .Unused {
74+ for _ , object := range res .(unused. Result ) .Unused {
7775 if object .Kind == "type param" {
7876 continue
7977 }
8078
81- if object .InGenerated {
82- continue
83- }
84-
8579 key := fmt .Sprintf ("%s %d %s" , object .Position .Filename , object .Position .Line , object .Name )
8680 if used [key ] {
8781 continue
You can’t perform that action at this time.
0 commit comments