Skip to content

Commit ecf8d52

Browse files
committed
fix version ranges for deprecation options
1 parent ae69469 commit ecf8d52

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ object ScalaVersion {
2929
val V2_12_0 = ScalaVersion(2, 12, 0)
3030
val V2_12_2 = ScalaVersion(2, 12, 2)
3131
val V2_12_5 = ScalaVersion(2, 12, 5)
32+
val V2_12_13 = ScalaVersion(2, 12, 13)
3233
val V2_13_0 = ScalaVersion(2, 13, 0)
3334
val V2_13_2 = ScalaVersion(2, 13, 2)
3435
val V2_13_3 = ScalaVersion(2, 13, 3)

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ private[scalacoptions] trait ScalacOptions {
4848

4949
/** Emit warning and location for usages of deprecated APIs.
5050
*/
51-
val deprecation = ScalacOption(
52-
"-deprecation",
53-
version => version < V2_13_0 || version >= V3_0_0
54-
)
51+
val deprecation = ScalacOption("-deprecation", _ => true)
5552

5653
/** Emit warning and location for usages of features that should be imported explicitly.
5754
*/
@@ -246,7 +243,7 @@ private[scalacoptions] trait ScalacOptions {
246243
/** Enable linted deprecations.
247244
*/
248245
val lintDeprecation =
249-
lintOption("deprecation", version => version.isBetween(V2_13_0, V3_0_0))
246+
lintOption("deprecation", version => version.isBetween(V2_12_13, V3_0_0))
250247

251248
/** Warn when a Scaladoc comment appears to be detached from its element.
252249
*/

0 commit comments

Comments
 (0)