Skip to content

Commit a37dcf4

Browse files
arixmkiikitbellew
authored andcommitted
Drop usage of IntegrationTest scope in sbt 2 builds
IntegrationTest scope has been completely removed in sbt 2.0.0-rc2.
1 parent 98bed4e commit a37dcf4

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.scalafmt.sbt
2+
3+
import sbt._
4+
5+
object ScalafmtPluginConfigurations {
6+
val supported = Seq(Compile, Test, IntegrationTest)
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.scalafmt.sbt
2+
3+
import sbt.*
4+
5+
object ScalafmtPluginConfigurations {
6+
val supported = Seq(Compile, Test)
7+
}

plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,12 @@ object ScalafmtPlugin extends AutoPlugin {
500500
ScopeFilter(configurations = inAnyConfiguration)
501501

502502
override def projectSettings: Seq[Def.Setting[_]] =
503-
Seq(Compile, Test, IntegrationTest).flatMap(scalafmtConfigSettings) ++ Seq(
504-
scalafmtAll := scalafmt.?.all(anyConfigsInThisProject).unit.value,
505-
scalafmtCheckAll := scalafmtCheck.?.all(anyConfigsInThisProject)
506-
.unit.value,
507-
)
503+
ScalafmtPluginConfigurations.supported.flatMap(scalafmtConfigSettings) ++
504+
Seq(
505+
scalafmtAll := scalafmt.?.all(anyConfigsInThisProject).unit.value,
506+
scalafmtCheckAll := scalafmtCheck.?.all(anyConfigsInThisProject)
507+
.unit.value,
508+
)
508509

509510
override def buildSettings: Seq[Def.Setting[_]] =
510511
Seq(scalafmtConfig := (ThisBuild / baseDirectory).value / ".scalafmt.conf")

0 commit comments

Comments
 (0)