Skip to content

Commit

Permalink
StyleMap: show comment with rewrite rules at odds
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Jul 12, 2023
1 parent 0f23519 commit cf76973
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import sbt._
import sbt.Keys._
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
// scalafmt: { maxColumn = 120, style = defaultWithAlign }

// scalafmt: { maxColumn = 120, align.preset = more }

object Dependencies {
val metaconfigV = "0.11.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ case class RewriteSettings(
val intersection = v1rules & v2rules
val missing = (v1rules | v2rules).diff(intersection).toSeq
val changed = intersection.toSeq.filter(_.hasChanged(this, v2))
Some((missing ++ changed).map(_.toString).sorted).filter(_.nonEmpty)
Some((missing ++ changed).map(_.getClass.getSimpleName).sorted)
.filter(_.nonEmpty)
}

private[config] def forSbt: RewriteSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class StyleMap(
// TODO(olafur) report error via callback
configured.foreach(logger.elem(_)) { style =>
init.rewrite.rulesChanged(style.rewrite).foreach { x =>
warn(x.mkString("May not override rewrite settings: ", ",", ""))
val rules = x.mkString(",")
warn(s"May not override rewrite settings; changed=[$rules]: $c")
}
changeStyle(style)
}
Expand Down

0 comments on commit cf76973

Please sign in to comment.