Skip to content

Releases: alejandrohdezma/sbt-fix

v0.7.2

10 Aug 10:48
8f7e118
Compare
Choose a tag to compare

📈 Dependency updates

Full Changelog: v0.7.1...v0.7.2

v0.7.1

15 Jun 06:37
7c94304
Compare
Choose a tag to compare

📈 Dependency updates

Full Changelog: v0.7.0...v0.7.1

v0.7.0

30 Jul 13:39
0942557
Compare
Choose a tag to compare

What's changed

⚠️ Breaking changes

Remove scalafixEnable from fix --check (#138)

Contributors to this release

@alejandrohdezma

v0.6.1

25 Jul 19:58
573c286
Compare
Choose a tag to compare

What's changed

❗ This release should be used instead of 0.6.0

scalafixAll should not be called with all #137

Contributors to this release

@alejandrohdezma

v0.6.0

23 Jul 08:33
13c08ca
Compare
Choose a tag to compare

❗ This release introduce a bug that prevents fix --check from working correctly. Use version 0.6.1 or greater instead.

What's changed

📈 Dependency updates

Contributors to this release

@alejandrohdezma

v0.5.0

15 Apr 19:31
dfea792
Compare
Choose a tag to compare

tl;dr;

Synchronization of configuration has been removed. To enable similar functionality to previous versions add the following to your plugins.sbt:

// This plugin no longer forces a version of Scalafmt/Scalafix
addSbtPlugin("ch.epfl.scala"       % "sbt-scalafix"          % "0.9.12")
addSbtPlugin("org.scalameta"       % "sbt-scalafmt"          % "2.3.2")

addSbtPlugin("com.alejandrohdezma" % "sbt-fix"               % "0.5.0")

// https://github.com/alejandrohdezma/sbt-scalafix-defaults
addSbtPlugin("com.alejandrohdezma" % "sbt-scalafix-defaults" % "0.1.0")
// https://github.com/alejandrohdezma/sbt-scalafmt-defaults
addSbtPlugin("com.alejandrohdezma" % "sbt-scalafmt-defaults" % "0.1.0")

If you were using extra configurations in your project you can add:

import scala.sys.process._

Global / onLoad := (Global / onLoad).value andThen { state =>
 (file(".scalafmt-extra.conf") #>> file(".scalafmt.conf")).!
 state
}

If you were using this plugin to synchronize your own configuration, you can continue to do so easily by using alejandrohdezma/sbt-scalafix-defaults and alejandrohdezma/sbt-scalafmt-defaults as templates, edit the included configurations at will and publish them under your own domain.

And last but not least sbt-fix-it has been removed. To obtain that same functionality, please add the following plugin to your project folder:

object IntegrationTestPlugin extends AutoPlugin {

  override def trigger               = allRequirements
  override def requires              = ScalafmtPlugin && ScalafixPlugin
  override def projectConfigurations = Seq(IntegrationTest)

  override def projectSettings = inConfig(IntegrationTest) {
    testSettings ++ scalafixConfigSettings(IntegrationTest) ++ scalafmtConfigSettings
  }

}

What's changed

The configuration-synchronization part of the plugin has become obsolete with alejandrohdezma/sbt-scalafix-defaults and alejandrohdezma/sbt-scalafmt-defaults.

These new plugins can be used to automatically include scalafmt & scalafix configuration files on any build and are auto-upgradable by using scala-steward. Also, they're written to be extremely easy to use as a template repository, so anyone out there can create their version to use across their repositories.

In addition, since there is no longer any synchronization, there is also no possibility of using .*-extra.conf files but it can be easily obtained by adding the following piece of code to your build.sbt:

import scala.sys.process._

Global / onLoad := (Global / onLoad).value andThen { state =>
  (file(".scalafmt-extra.conf") #>> file(".scalafmt.conf")).!
  state
}

Also sbt-fix-it has been removed. It was only useful for projects using both tools that also use the IntegrationTest configuration.

The same goal can be met by adding the following AutoPlugin to your project folder:

object IntegrationTestPlugin extends AutoPlugin {

  override def trigger               = allRequirements
  override def requires              = ScalafmtPlugin && ScalafixPlugin
  override def projectConfigurations = Seq(IntegrationTest)

  override def projectSettings = inConfig(IntegrationTest) {
    testSettings ++ scalafixConfigSettings(IntegrationTest) ++ scalafmtConfigSettings
  }

}

Finally, dependencies with scalafix and scalafmt have been set as Provided so you'll need to provide your own version of these plugins in your plugins.sbt:

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.12")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.2")

⚠️ Breaking changes

🚀 Features

🐛 Bug Fixes

📈 Dependency updates

Contributors to this release

@alejandrohdezma

v0.4.0

28 Feb 21:59
9e54243
Compare
Choose a tag to compare

What's changed

🚀 Features

📈 Dependency updates

📘 Documentation

🐛 Bug Fixes

Contributors to this release

@alejandrohdezma and @sideeffffect

v0.3.1

26 Feb 13:49
Compare
Choose a tag to compare

Update to sbt-fix-defaults v0.0.5

v0.3.0

15 Feb 11:45
82010bd
Compare
Choose a tag to compare
Merge pull request #28 from alejandrohdezma/remove-scalaj

Remove dependency on `scalaj-http`