-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add support for Scala 2.13.14
- Loading branch information
Showing
3 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ary/src/main/scala-2.13.14/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package scala.meta.internal.semanticdb.scalac | ||
|
||
import scala.reflect.internal.util.CodeAction | ||
import scala.reflect.internal.util.Position | ||
import scala.tools.nsc.Settings | ||
import scala.tools.nsc.reporters.FilteringReporter | ||
import scala.tools.nsc.reporters.StoreReporter | ||
|
||
class SemanticdbReporter(underlying: FilteringReporter) | ||
extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) { | ||
override def doReport( | ||
pos: Position, | ||
msg: String, | ||
severity: Severity, | ||
actions: List[CodeAction] | ||
): Unit = { | ||
super.doReport(pos, msg, severity, actions) | ||
underlying.doReport(pos, msg, severity, actions) | ||
} | ||
|
||
// overriding increment is enough so make sure that error/warning | ||
// counts are the same as in underlying reporter | ||
|
||
override def increment(severity: Severity): Unit = { | ||
super.increment(severity) | ||
underlying.increment(severity) | ||
} | ||
} | ||
object SemanticdbReporter { | ||
def defaultSettings(s: Settings): Settings = { | ||
s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true) | ||
s | ||
} | ||
} |