-
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.12.17
- Loading branch information
Showing
8 changed files
with
58 additions
and
7 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
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
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
37 changes: 37 additions & 0 deletions
37
...ary/src/main/scala-2.12.17/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,37 @@ | ||
package scala.meta.internal.semanticdb.scalac | ||
|
||
import scala.reflect.internal.util.Position | ||
import scala.tools.nsc.Settings | ||
import scala.tools.nsc.reporters.{Reporter, StoreReporter} | ||
|
||
class SemanticdbReporter(underlying: Reporter) | ||
extends StoreReporter(SemanticdbReporter.defaultSettings()) { | ||
override protected def info0( | ||
pos: Position, | ||
msg: String, | ||
severity: Severity, | ||
force: Boolean | ||
): Unit = { | ||
super.info0(pos, msg, severity, force) | ||
severity.id match { | ||
case 0 => underlying.info(pos, msg, force) | ||
case 1 => underlying.warning(pos, msg) | ||
case 2 => underlying.error(pos, msg) | ||
case _ => | ||
} | ||
|
||
} | ||
|
||
override def hasErrors: Boolean = underlying.hasErrors | ||
|
||
override def hasWarnings: Boolean = underlying.hasWarnings | ||
|
||
} | ||
|
||
object SemanticdbReporter { | ||
def defaultSettings(): Settings = { | ||
val s = new Settings() | ||
s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true) | ||
s | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ary/src/main/scala-2.12.17/scala/meta/internal/semanticdb/scalac/VersionCompilerOps.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,9 @@ | ||
package scala.meta.internal.semanticdb.scalac | ||
|
||
import scala.tools.nsc.interactive.Global | ||
|
||
trait VersionCompilerOps { | ||
|
||
def forceWarnings(global: Global) = {} | ||
|
||
} |
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