File tree 1 file changed +2
-8
lines changed 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) {
63
63
return nil , err
64
64
}
65
65
66
- sr := unused .Serialize (pass , res .(unused.Result ), pass .Fset )
67
-
68
66
used := make (map [string ]bool )
69
- for _ , obj := range sr .Used {
67
+ for _ , obj := range res .(unused. Result ) .Used {
70
68
used [fmt .Sprintf ("%s %d %s" , obj .Position .Filename , obj .Position .Line , obj .Name )] = true
71
69
}
72
70
73
71
var issues []goanalysis.Issue
74
72
75
73
// 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 {
77
75
if object .Kind == "type param" {
78
76
continue
79
77
}
80
78
81
- if object .InGenerated {
82
- continue
83
- }
84
-
85
79
key := fmt .Sprintf ("%s %d %s" , object .Position .Filename , object .Position .Line , object .Name )
86
80
if used [key ] {
87
81
continue
You can’t perform that action at this time.
0 commit comments