Skip to content

Commit

Permalink
Rename trueOrBoom to more explicit throwOnFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Meltzer committed Nov 15, 2021
1 parent 694d0e6 commit feee362
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ object ScalafmtPlugin extends AutoPlugin {
)
}

private def trueOrBoom(analysis: ScalafmtAnalysis): Unit = {
private def throwOnFailure(analysis: ScalafmtAnalysis): Unit = {
val failureCount = analysis.failedScalafmtCheck.size
if (failureCount > 0) {
throw new MessageOnlyException(
Expand Down Expand Up @@ -395,12 +395,12 @@ object ScalafmtPlugin extends AutoPlugin {
fullResolvers.value,
scalafmtDetailedError.value
)
trueOrBoom(analysis)
throwOnFailure(analysis)
} tag (ScalafmtTagPack: _*)

private def scalafmtSbtCheckTask =
Def.task {
trueOrBoom(
throwOnFailure(
checkSources(
sbtSources.value,
sbtConfig.value,
Expand All @@ -410,7 +410,7 @@ object ScalafmtPlugin extends AutoPlugin {
scalafmtDetailedError.value
)
)
trueOrBoom(
throwOnFailure(
checkSources(
metabuildSources.value,
scalaConfig.value,
Expand Down

0 comments on commit feee362

Please # to comment.