diff --git a/.scalafmt.conf b/.scalafmt.conf index afaeefb7306..130fad16edf 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -23,10 +23,7 @@ runner.dialect = scala213 project { excludePaths = [ - "glob:**/example/scalalib/linting/1-scalafmt/src/Foo.scala", - # Stop ignoring these paths after upgrading to runner.dialect = scala3, - "glob:**/example/scalalib/native/1-simple/src/Foo.scala", - "glob:**/example/scalalib/native/4-common-config/src/Foo.scala" + "glob:**/example/scalalib/linting/1-scalafmt/src/Foo.scala" ] } @@ -37,4 +34,5 @@ fileOverride { "glob:**/example/**/build.sc" { docstrings.style = keep } + "glob:**/example/scalalib/native/**/*.scala" = scala3 } \ No newline at end of file diff --git a/example/scalalib/native/1-simple/src/Foo.scala b/example/scalalib/native/1-simple/src/Foo.scala index 8b60d9a3747..1bb9145f0ee 100644 --- a/example/scalalib/native/1-simple/src/Foo.scala +++ b/example/scalalib/native/1-simple/src/Foo.scala @@ -5,13 +5,13 @@ import scala.scalanative.unsafe._ import mainargs.{main, ParserForMethods} object Foo { - - def generateHtml(text: String) (using Zone) = { + + def generateHtml(text: String)(using Zone) = { val html = "

" + text + "

\n" val cResult = toCString(html) cResult - + } @main @@ -21,4 +21,3 @@ object Foo { def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args) } - diff --git a/example/scalalib/native/4-common-config/src/Foo.scala b/example/scalalib/native/4-common-config/src/Foo.scala index b77d8d2632d..32415ff110b 100644 --- a/example/scalalib/native/4-common-config/src/Foo.scala +++ b/example/scalalib/native/4-common-config/src/Foo.scala @@ -6,16 +6,15 @@ import fansi._ object Foo { - def generateHtml(text: String) (using Zone) = { + def generateHtml(text: String)(using Zone) = { val colored = Console.RED + "

" + text + "

" + Console.RESET val cResult = toCString(colored) cResult } - + def main(args: Array[String]): Unit = Zone { val value = generateHtml("hello") stdio.printf(c"Value: %s\n", value) } } -