~jan0sch/smederee

Showing details for patch 24957aada07ce9c398a5f3d1a880ad0e38ccaeec.
2024-07-22 (Mon), 8:52 AM - Jens Grassel - 24957aada07ce9c398a5f3d1a880ad0e38ccaeec

codingstyle: exclude build definition files from automatic formatting

Summary of changes
2 files modified with 5 lines added and 2 lines removed
  • .scalafmt.conf with 4 added and 2 removed lines
  • CODINGSTYLE.md with 1 added and 0 removed lines
diff -rN -u old-smederee/CODINGSTYLE.md new-smederee/CODINGSTYLE.md
--- old-smederee/CODINGSTYLE.md	2025-01-11 03:16:54.917148643 +0000
+++ new-smederee/CODINGSTYLE.md	2025-01-11 03:16:54.917148643 +0000
@@ -76,6 +76,7 @@
    addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4")
    addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
    ```
+4. Build definition and settings files (i.e. `build.sbt` and `project/plugins.sbt`) SHALL not be formatted automatically via `scalafmt`.
 
 ## 4. SQL
 
diff -rN -u old-smederee/.scalafmt.conf new-smederee/.scalafmt.conf
--- old-smederee/.scalafmt.conf	2025-01-11 03:16:54.917148643 +0000
+++ new-smederee/.scalafmt.conf	2025-01-11 03:16:54.917148643 +0000
@@ -20,9 +20,11 @@
 maxColumn                           = 120
 newlines.beforeOpenParenDefnSite    = null
 newlines.forceBeforeMultilineAssign = def
+project.excludePaths                = [
+  "glob:**/build.sbt",
+  "glob:**/project/plugins.sbt"
+]
 project.includePaths                = [
-    "glob:**/build.sbt",
-    "glob:**/project/plugins.sbt",
     "glob:**/project/*.scala",
     "glob:**/src/**.scala"
 ]