wartremover/wartremover

`wartremover:cp` option with Scala 3

xuwei-k opened this issue · 0 comments

e.g. dependsOnLocalProjectWarts does not work.

val excluded = options.collect { case s"excluded:${path}" =>
new File(path).getAbsolutePath
}
val (errors1, errorWarts) = options.collect { case s"traverser:${name}" =>
loadWart(name)
}.partitionMap(identity)
val (errors2, warningWarts) = options.collect { case s"only-warn-traverser:${name}" =>
loadWart(name)
}.partitionMap(identity)
val loglevel = options.collect { case s"loglevel:${level}" =>
LogLevel.map.get(level)
}.flatten.headOption.getOrElse(LogLevel.Disable)
val newPhase = new WartremoverPhase(
errorWarts = errorWarts,
warningWarts = warningWarts,
loadFailureWarts = errors1 ++ errors2,
excluded = excluded,
logLevel = loglevel,
initialLog = initialLog,
)