Skip to content

Commit

Permalink
scalafixEnable: also relax -Xfatal-warnings for scalafixAll
Browse files Browse the repository at this point in the history
  • Loading branch information
github-brice-jaglin committed Mar 4, 2021
1 parent c72992e commit 9c91d70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/main/scala/scalafix/sbt/ScalafixEnable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,12 @@ object ScalafixEnable {
}

private def scalafixInvoked: Def.Initialize[Task[Boolean]] =
Def.task(executionRoots.value.exists(_.key == scalafix.key))
Def.task {
executionRoots.value.exists { root =>
Seq(
scalafix.key,
scalafixAll.key
).contains(root.key)
}
}
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-scalafix/scalafixEnable/test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-> scala212/compile

# ensure that a semantic rule can be ran despite warnings, to fix one of the warning
> scala212/scalafix RemoveUnused
> scala212/scalafixAll RemoveUnused

# but that -Xfatal-warnings remains honored for regular compilation
-> scala212/compile
Expand Down

0 comments on commit 9c91d70

Please sign in to comment.