From 3af725c8795ba79aefead7c032353f3992918607 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Sat, 2 Dec 2023 18:52:21 -0700 Subject: [PATCH] integrate scala_rule with ShouldResolveFileSymbolName --- language/scala/scala_rule.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/language/scala/scala_rule.go b/language/scala/scala_rule.go index d3a8f3b..71a4193 100644 --- a/language/scala/scala_rule.go +++ b/language/scala/scala_rule.go @@ -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 {