diff --git a/.scalafmt.conf b/.scalafmt.conf index 66c2ae2..9705d2e 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -50,5 +50,9 @@ docstrings.wrap = yes includeNoParensInSelectChains = true optIn.breakChainOnFirstMethodDot = true +rewrite.rules = [RedundantBraces] +rewrite.redundantBraces.ifElseExpressions = true +rewrite.redundantBraces.stringInterpolation = true + rewrite.scala3.convertToNewSyntax = true rewrite.scala3.removeOptionalBraces = true diff --git a/firepower-core/src/main/scala/com/htmlism/firepower/core/CodeGenerator.scala b/firepower-core/src/main/scala/com/htmlism/firepower/core/CodeGenerator.scala index 5ee0a5d..9738562 100644 --- a/firepower-core/src/main/scala/com/htmlism/firepower/core/CodeGenerator.scala +++ b/firepower-core/src/main/scala/com/htmlism/firepower/core/CodeGenerator.scala @@ -29,7 +29,7 @@ object CodeGenerator extends App: println(s" Asm${n + 1}Instructions(xs, oComment)") println println( - s"case class AndThen${n}[$typeParameterList](left: Asm$n[$typeParameterList], right: Asm$n[$typeParameterList], oComment: Option[String]) extends Asm${n}[$typeParameterList]:" + s"case class AndThen$n[$typeParameterList](left: Asm$n[$typeParameterList], right: Asm$n[$typeParameterList], oComment: Option[String]) extends Asm$n[$typeParameterList]:" ) println(" def xs: List[String] =") println(" left.xs ++ right.xs") @@ -38,7 +38,7 @@ object CodeGenerator extends App: println(" copy(oComment = Some(s))") println println( - s"case class Asm${n}Instructions[$typeParameterList](xs: List[String], oComment: Option[String] = None) extends Asm${n}[$typeParameterList]:" + s"case class Asm${n}Instructions[$typeParameterList](xs: List[String], oComment: Option[String] = None) extends Asm$n[$typeParameterList]:" ) println(s" def comment(s: String): Asm$n[$typeParameterList] =") println(" copy(oComment = Some(s))")