Skip to content

Commit

Permalink
integrate scala_rule with ShouldResolveFileSymbolName
Browse files Browse the repository at this point in the history
  • Loading branch information
pcj committed Dec 3, 2023
1 parent cb52fff commit 3af725c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions language/scala/scala_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ func (r *scalaRule) fileImports(file *sppb.File, imports resolver.ImportMap) {

// resolve symbols named in the file. For each one we find, add an import.
for _, name := range file.Names {
if !r.ctx.scalaConfig.ShouldResolveFileSymbolName(file.Filename, name) {
continue
}
if sym, ok := scope.GetSymbol(name); ok {
putImport(resolver.NewResolvedNameImport(sym.Name, file, name, sym))
} else {
Expand Down

0 comments on commit 3af725c

Please sign in to comment.