diff --git a/.scalafmt.conf b/.scalafmt.conf index 6ff9407ced..e0b727bdb2 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.1 +version = 3.8.2 project.layout = StandardConvention runner.dialect = scala3 maxColumn = 120 @@ -20,11 +20,17 @@ runner.dialectOverride.allowSignificantIndentation = false runner.dialectOverride.allowQuestionMarkAsTypeWildcard = false fileOverride { + "glob:**/scala/**" { + runner.dialect = scala213source3 + } "glob:**/scala-2/**" { - runner.dialect = scala213source3 + runner.dialect = scala213source3 + } + "glob:**/scala-3/**" { + runner.dialect = scala3 } "glob:**/scala-3/wvlet/log/LoggerBase.scala" { - // optional brace didn't work for code with inline/macro methods - rewrite.scala3.removeOptionalBraces = no + // optional brace didn't work for code with inline/macro methods + rewrite.scala3.removeOptionalBraces = no } } diff --git a/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala b/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala index bf87a24b26..883ae9c4e6 100644 --- a/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala +++ b/airframe-control/src/main/scala/wvlet/airframe/control/HealthCheckPolicy.scala @@ -138,7 +138,7 @@ object HealthCheckPolicy extends LogSupport { private def setAndMove(v: Boolean): Unit = { val i = (executionCount % numExecutions).toInt - val mask = 1L << (63 - i % 64) + val mask = 1L << (63 - i % 64) if (v == true) { executionHistory(i / 64) |= mask } else { diff --git a/airframe-rx-html/src/test/scala/wvlet/airframe/rx/html/HtmlTest.scala b/airframe-rx-html/src/test/scala/wvlet/airframe/rx/html/HtmlTest.scala index 7ddd431e51..1440d1f3b9 100644 --- a/airframe-rx-html/src/test/scala/wvlet/airframe/rx/html/HtmlTest.scala +++ b/airframe-rx-html/src/test/scala/wvlet/airframe/rx/html/HtmlTest.scala @@ -133,7 +133,7 @@ class HtmlTest extends AirSpec { style.noValue ) - val d = div() + val d = div() d(style -> "width: 10px;") d.addModifier(cls -> "test") }