From cace58fab0421ebfc3ccdd0b636f5205c2e620b3 Mon Sep 17 00:00:00 2001 From: davesmith00000 Date: Sat, 20 Sep 2025 15:29:11 +0100 Subject: [PATCH] Add fatal warnings example to the README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 063a043..1782f75 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,17 @@ ScalacOptions.defaultOptionsForVersion( The following are simple examples of use in sbt and Mill. Note that they are not complete project definitions. +### Modifying options: Fatal warnings example + +A common requirement is use a modified version of the default settings. In this example, we are going to enable fatal warnings. + +```scala +ScalacOptions.tokensForVersion( + ScalaVersion.V3_1_0, + ScalacOptions.default ++ ScalacOptions.fatalWarningOptions +) +``` + ### sbt example Add the following dependency to an `sbt` file within the project directory, for instance `project/plugins`: