scalafmt braces

This commit is contained in:
Mark Canlas 2024-08-07 07:11:06 -04:00
parent 084314bf58
commit 77d2cd240a
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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))")