File tree Expand file tree Collapse file tree
plugin/src/main/scala/org/scalafmt/sbt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -499,9 +499,9 @@ object ScalafmtPlugin extends AutoPlugin {
499499
500500 override def projectSettings : Seq [Def .Setting [_]] =
501501 Seq (Compile , Test , IntegrationTest ).flatMap(scalafmtConfigSettings) ++ Seq (
502- scalafmtAll := scalafmt.? .all(anyConfigsInThisProject).map(_ => ()) .value,
502+ scalafmtAll := scalafmt.? .all(anyConfigsInThisProject).unit .value,
503503 scalafmtCheckAll := scalafmtCheck.? .all(anyConfigsInThisProject)
504- .map(_ => ()) .value,
504+ .unit .value,
505505 )
506506
507507 override def buildSettings : Seq [Def .Setting [_]] =
@@ -538,4 +538,10 @@ object ScalafmtPlugin extends AutoPlugin {
538538 }
539539 }
540540
541+ private implicit class ImplicitInitialize [T ](
542+ private val obj : Def .Initialize [Task [T ]],
543+ ) extends AnyVal {
544+ def unit = obj.map(_ => ())
545+ }
546+
541547}
You can’t perform that action at this time.
0 commit comments