~jan0sch/smederee

Showing details for patch 3fa45eaa5f06bbbc519bdf372b3707c77dba0773.
2024-02-02 (Fri), 4:48 PM - Jens Grassel - 3fa45eaa5f06bbbc519bdf372b3707c77dba0773

build: enable Xfatal-warnings whenever possible

- enable Xfatal-warnings flag for each module that doesn't use twirl
- fix a fatal warning in the `MarkdownRenderer`
Summary of changes
2 files modified with 6 lines added and 1 lines removed
  • build.sbt with 5 added and 0 removed lines
  • modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala with 1 added and 1 removed lines
diff -rN -u old-smederee/build.sbt new-smederee/build.sbt
--- old-smederee/build.sbt	2025-01-13 01:33:12.750752429 +0000
+++ new-smederee/build.sbt	2025-01-13 01:33:12.750752429 +0000
@@ -73,6 +73,7 @@
         .settings(commonSettings)
         .settings(
             name := "darcs",
+            scalacOptions += "-Xfatal-warnings",
             libraryDependencies ++= Seq(
                 library.catsCore,
                 library.catsEffect,
@@ -92,6 +93,7 @@
         .settings(commonSettings)
         .settings(
             name := "email",
+            scalacOptions += "-Xfatal-warnings",
             libraryDependencies ++= Seq(
                 library.catsCore,
                 library.catsEffect,
@@ -112,6 +114,7 @@
         .settings(commonSettings)
         .settings(
             name := "html-utils",
+            scalacOptions += "-Xfatal-warnings",
             libraryDependencies ++= Seq(
                 library.catsCore,
                 library.commonMark,
@@ -233,6 +236,7 @@
         .settings(commonSettings)
         .settings(
             name := "i18n",
+            scalacOptions += "-Xfatal-warnings",
             libraryDependencies ++= Seq(
                 library.catsCore,
                 library.logback,
@@ -249,6 +253,7 @@
         .settings(commonSettings)
         .settings(
             name := "security",
+            scalacOptions += "-Xfatal-warnings",
             libraryDependencies ++= Seq(
                 library.bouncyCastleProvider % Runtime,
                 library.catsCore,
diff -rN -u old-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala new-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala
--- old-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala	2025-01-13 01:33:12.750752429 +0000
+++ new-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala	2025-01-13 01:33:12.750752429 +0000
@@ -116,7 +116,7 @@
                                 else
                                     uri.copy(path = pathPrefix |+| uri.path)
                             log.debug(s"Corrected URI for repository overview README rendering: $uri -> $correctedUri")
-                            attributes.put("href", correctedUri.toString)
+                            val _ = attributes.put("href", correctedUri.toString)
                         }
                 }
             }