Skip to content

Commit 89d2704

Browse files
committed
Add -Wall option
1 parent 3405e12 commit 89d2704

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/src/main/scala/org/typelevel/scalacoptions/ScalaVersion.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ object ScalaVersion {
4848
val V3_3_0 = ScalaVersion(3, 3, 0)
4949
val V3_3_1 = ScalaVersion(3, 3, 1)
5050
val V3_3_3 = ScalaVersion(3, 3, 3)
51+
val V3_3_5 = ScalaVersion(3, 3, 5)
5152
val V3_4_0 = ScalaVersion(3, 4, 0)
5253
val V3_5_0 = ScalaVersion(3, 5, 0)
54+
val V3_5_2 = ScalaVersion(3, 5, 2)
5355

5456
private val versionRegex = raw"""(\d+)\.(\d+)\.(\d+)(?:-.*)?""".r
5557
def fromString(version: String): Either[IllegalArgumentException, ScalaVersion] =

lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,15 @@ private[scalacoptions] trait ScalacOptions {
825825
val warnSafeInit =
826826
warnOption("safe-init", version => version >= V3_5_0)
827827

828+
/** Enables all warnings. More info:
829+
*
830+
* [[https://github.com/scala/scala3/pull/20577]]
831+
*
832+
* Added in 3.5.2, back ported to 3.3.5
833+
*/
834+
val warnAll =
835+
warnOption("all", version => version.isAtLeast(V3_5_2) || version.isBetween(V3_3_5, V3_4_0))
836+
828837
/** Unused warning options (-Wunused:)
829838
*/
830839
val warnUnusedOptions: Set[ScalacOption] = ListSet(

0 commit comments

Comments
 (0)