All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mill.scalalib.worker.ZincProblem.scala Maven / Gradle / Ivy

There is a newer version: 0.12.2-20-231ff6
Show newest version
package mill.scalalib.worker

import mill.api.{Problem, ProblemPosition, Severity, internal}
import mill.api.DiagnosticCode
import scala.jdk.OptionConverters._

@internal
class ZincProblem(base: xsbti.Problem) extends Problem {
  override def category: String = base.category()

  override def severity: Severity = base.severity() match {
    case xsbti.Severity.Info => mill.api.Info
    case xsbti.Severity.Warn => mill.api.Warn
    case xsbti.Severity.Error => mill.api.Error
  }

  override def message: String = base.message()

  override def position: ProblemPosition = new ZincProblemPosition(base.position())

  override def diagnosticCode: Option[DiagnosticCode] =
    base.diagnosticCode().toScala.map(ZincDiagnosticCode)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy