pekko/project/ScalafixForMultiNodePlugin.scala

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.2 KiB
Scala
Raw Normal View History

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
2023-06-22 14:19:26 +01:00
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
2022-02-04 12:36:44 +01:00
* Copyright (C) 2018-2022 Lightbend Inc. <https://www.lightbend.com>
*/
import sbt.{ inConfig, AutoPlugin, Def, PluginTrigger, Plugins, Setting }
import scalafix.sbt.ScalafixPlugin
import scalafix.sbt.ScalafixPlugin.autoImport.scalafixConfigSettings
object ScalafixForMultiNodePlugin extends AutoPlugin with ScalafixSupport {
2024-01-22 07:15:16 +01:00
override lazy val trigger: PluginTrigger = allRequirements
2024-01-22 07:15:16 +01:00
override lazy val requires: Plugins = MultiNode && ScalafixPlugin
import MultiJvmPlugin.autoImport._
lazy val scalafixIgnoredSetting: Seq[Setting[_]] = Seq(ignore(MultiJvm))
2024-01-22 07:15:16 +01:00
override lazy val projectSettings: Seq[Def.Setting[_]] =
Seq(MultiJvm).flatMap(c => inConfig(c)(scalafixConfigSettings(c))) ++
scalafixIgnoredSetting ++ Seq(
updateProjectCommands(alias = "fixall", value = ";scalafixEnable;scalafixAll;scalafmtAll"),
updateProjectCommands(alias = "sortImports", value = ";scalafixEnable;scalafixAll SortImports;scalafmtAll"))
}