Skip to content

Commit

Permalink
unused: actually keep track of packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh committed Apr 27, 2019
1 parent e7d16c0 commit aa43d95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unused/unused.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ func NewChecker() *Checker {
c := &Checker{
seen: map[token.Position]struct{}{},
initialPackages: map[*types.Package]struct{}{},
allPackages: map[*types.Package]struct{}{},
}

return c
Expand Down Expand Up @@ -456,6 +457,7 @@ func (c *Checker) Run(pass *analysis.Pass) (interface{}, error) {
visit(imp)
}
}
visit(pass.Pkg)

c.fset = pass.Fset
ssapkg := pass.ResultOf[buildssa.Analyzer].(*buildssa.SSA)
Expand Down

0 comments on commit aa43d95

Please sign in to comment.