Skip to content

Commit 08a503b

Browse files
committed
Revert backwards incompatible 2.13 changes
1 parent 72f20f7 commit 08a503b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

third_party/dependency_analyzer/src/main/io/bazel/rulesscala/dependencyanalyzer/DependencyAnalyzer.scala

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package third_party.dependency_analyzer.src.main.io.bazel.rulesscala.dependencyanalyzer
22

33
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
68

79
class DependencyAnalyzer(val global: Global) extends Plugin {
810

@@ -146,13 +148,13 @@ class DependencyAnalyzer(val global: Global) extends Plugin {
146148
errors: Map[String, global.Position]
147149
): Unit = {
148150
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)
156158
}
157159
case AnalyzerMode.Off => (_, _) => ()
158160
}

0 commit comments

Comments
 (0)