|
1 | 1 | package third_party.dependency_analyzer.src.main.io.bazel.rulesscala.dependencyanalyzer
|
2 | 2 |
|
3 | 3 | import scala.reflect.io.AbstractFile
|
4 |
| -import scala.tools.nsc.{Global, Phase} |
5 |
| -import scala.tools.nsc.plugins.{Plugin, PluginComponent} |
| 4 | +import scala.tools.nsc.plugins.Plugin |
| 5 | +import scala.tools.nsc.plugins.PluginComponent |
| 6 | +import scala.tools.nsc.Global |
| 7 | +import scala.tools.nsc.Phase |
6 | 8 |
|
7 | 9 | class DependencyAnalyzer(val global: Global) extends Plugin {
|
8 | 10 |
|
@@ -146,13 +148,13 @@ class DependencyAnalyzer(val global: Global) extends Plugin {
|
146 | 148 | errors: Map[String, global.Position]
|
147 | 149 | ): Unit = {
|
148 | 150 | val reportFunction: (String, global.Position) => Unit = analyzerMode match {
|
149 |
| - case AnalyzerMode.Error => { |
150 |
| - case (message, pos) => |
151 |
| - global.reporter.doReport(pos, message, global.reporter.ERROR) |
152 |
| - } |
153 |
| - case AnalyzerMode.Warn => { |
154 |
| - case (message, pos) => |
155 |
| - global.reporter.doReport(pos, message, global.reporter.WARNING) |
| 151 | + case AnalyzerMode.Error => |
| 152 | + { case (message, pos) => |
| 153 | + global.reporter.error(pos, message) |
| 154 | + } |
| 155 | + case AnalyzerMode.Warn => |
| 156 | + { case (message, pos) => |
| 157 | + global.reporter.warning(pos, message) |
156 | 158 | }
|
157 | 159 | case AnalyzerMode.Off => (_, _) => ()
|
158 | 160 | }
|
|
0 commit comments