Skip to content

Commit 253b314

Browse files
committed
Add -Wall as supported flag for RemoveUnused
Was implemented in the scala3 compiler with this issue scala/scala3#18559
1 parent 56c915a commit 253b314

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scalafix-rules/src/main/scala/scalafix/internal/rule/RemoveUnused.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RemoveUnused(config: RemoveUnusedConfig)
3030
override def isRewrite: Boolean = true
3131

3232
private def warnUnusedPrefix = List("-Wunused", "-Ywarn-unused")
33-
private def warnUnusedString = List("-Xlint", "-Xlint:unused")
33+
private def warnUnusedString = List("-Wall", "-Xlint", "-Xlint:unused")
3434
override def withConfiguration(config: Configuration): Configured[Rule] = {
3535
val diagnosticsAvailableInSemanticdb =
3636
Seq("3.0", "3.1", "3.2", "3.3.0", "3.3.1", "3.3.2", "3.3.3")
@@ -43,8 +43,8 @@ class RemoveUnused(config: RemoveUnusedConfig)
4343
if (!hasWarnUnused) {
4444
Configured.error(
4545
"""|A Scala compiler option is required to use RemoveUnused. To fix this problem,
46-
|update your build to add -Ywarn-unused (with 2.12), -Wunused (with 2.13), or
47-
|-Wunused:all (with 3.3.4+)""".stripMargin
46+
|update your build to add -Ywarn-unused (with 2.12), -Wunused (with 2.13),
47+
|-Wunused:all (with 3.3.4+), or -Wall (with 3.5.2+ and backported to 3.3.5+)""".stripMargin
4848
)
4949
} else if (!diagnosticsAvailableInSemanticdb) {
5050
Configured.error(

0 commit comments

Comments
 (0)