Setup different fix alias on different sub projects and add support to ignore dedicated packages when do scalafix.
Because some sub projects does not enable the MultiNode plugin. Add ignore packages support for scalafix.
This commit is contained in:
parent
82dea881ce
commit
746d0adb45
6 changed files with 135 additions and 46 deletions
|
|
@ -4,9 +4,9 @@
|
|||
package akka
|
||||
|
||||
import sbt.plugins.JvmPlugin
|
||||
import sbt.{AutoPlugin, PluginTrigger, Plugins}
|
||||
import sbt.{AutoPlugin, PluginTrigger, Plugins, ScalafixSupport}
|
||||
|
||||
object ScalafixIgnoreFilePlugin extends AutoPlugin with ScalafixIgnoreFileSupport {
|
||||
object ScalafixIgnoreFilePlugin extends AutoPlugin with ScalafixSupport {
|
||||
override def trigger: PluginTrigger = allRequirements
|
||||
|
||||
override def requires: Plugins = JvmPlugin
|
||||
|
|
@ -15,5 +15,8 @@ object ScalafixIgnoreFilePlugin extends AutoPlugin with ScalafixIgnoreFileSuppor
|
|||
ignore(Test)
|
||||
)
|
||||
|
||||
override def projectSettings: Seq[Def.Setting[_]] = scalafixIgnoredSetting
|
||||
override def projectSettings: Seq[Def.Setting[_]] = scalafixIgnoredSetting ++ Seq(
|
||||
addProjectCommandsIfAbsent(
|
||||
alias = "fix",
|
||||
value = ";scalafixEnable;compile:scalafix;test:scalafix;test:compile"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue