Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: scalacenter/sbt-scalafix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.1
Choose a base ref
...
head repository: scalacenter/sbt-scalafix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.10.2
Choose a head ref

Commits on Jun 12, 2022

  1. Copy the full SHA
    f05cbff View commit details
  2. Merge pull request #305 from bjaglin/config-per-config

    demonstrate usage of different conf files per sbt config
    bjaglin authored Jun 12, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dd84703 View commit details

Commits on Jun 24, 2022

  1. Copy the full SHA
    4d3533e View commit details

Commits on Jun 25, 2022

  1. Merge pull request #306 from scalacenter/dont-swallow-unchecked

    don't swallow stack traces on unchecked exception
    bjaglin authored Jun 25, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2243306 View commit details

Commits on Jul 15, 2022

  1. Update fansi to 0.4.0

    scala-steward committed Jul 15, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    4baaf0a View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    2bbd9a3 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    c433c2e View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    9149cb5 View commit details
  5. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    e66ea7b View commit details

Commits on Jul 16, 2022

  1. Merge pull request #312 from scala-steward/update/scalafmt-core-3.5.8

    Update scalafmt-core to 3.5.8
    bjaglin authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f7f3a6c View commit details
  2. Merge pull request #311 from scala-steward/update/sbt-1.7.1

    Update sbt, scripted-plugin to 1.7.1
    bjaglin authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    74e39c0 View commit details
  3. Merge pull request #309 from scala-steward/update/org.eclipse.jgit-5.…

    …13.1.202206130422-r
    
    Update org.eclipse.jgit to 5.13.1.202206130422-r
    bjaglin authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1eef93c View commit details
  4. Merge pull request #308 from scala-steward/update/interface-1.0.8

    Update interface to 1.0.8
    bjaglin authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3b96ff3 View commit details
  5. Merge pull request #307 from scala-steward/update/fansi-0.4.0

    Update fansi to 0.4.0
    bjaglin authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8a59e1c View commit details

Commits on Jul 22, 2022

  1. Copy the full SHA
    2a3b0e2 View commit details
  2. Merge pull request #310 from scala-steward/update/scala-library-2.12.16

    Update scala-library to 2.12.16
    bjaglin authored Jul 22, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    169fc60 View commit details

Commits on Sep 1, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    2a3337a View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    scala-steward Scala Steward
    Copy the full SHA
    a4beb06 View commit details
  3. Merge pull request #314 from scala-steward/update/scalatest-3.2.13

    Update scalatest to 3.2.13
    bjaglin authored Sep 1, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5013883 View commit details
  4. Merge pull request #313 from scala-steward/update/scalafmt-core-3.5.9

    Update scalafmt-core to 3.5.9
    bjaglin authored Sep 1, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    792d528 View commit details

Commits on Sep 15, 2022

  1. scalafix 0.10.2

    bjaglin authored Sep 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1547782 View commit details
  2. gitter -> discord

    bjaglin authored Sep 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    96824ef View commit details
  3. Merge pull request #316 from scalacenter/discord

    gitter -> discord
    bjaglin authored Sep 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    74612b2 View commit details
  4. Merge pull request #315 from scalacenter/scalafix0102

    scalafix 0.10.2
    bjaglin authored Sep 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9283ee5 View commit details
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.5.3"
version = "3.5.9"
project.git=true
align.preset=none
assumeStandardLibraryStripMargin = true
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -20,4 +20,4 @@ main branch. You can read more about it at http://scalafmt.org

## TL;DR

If you are unsure about anything, don't hesitate to ask in the [gitter channel](https://gitter.im/scalacenter/scalafix).
If you are unsure about anything, don't hesitate to ask in the [Discord channel](https://discord.gg/8AHaqGx3Qj).
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -41,11 +41,11 @@ commands += Command.command("ci-windows") { s =>
resolvers += Resolver.sonatypeRepo("public")
libraryDependencies ++= Dependencies.all
libraryDependencies ++= List(
"com.lihaoyi" %% "fansi" % "0.3.1" % Test,
"org.scalatest" %% "scalatest" % "3.2.12" % Test
"com.lihaoyi" %% "fansi" % "0.4.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.13" % Test
)

scalaVersion := "2.12.15"
scalaVersion := "2.12.16"

// keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049
pluginCrossBuild / sbtVersion := "1.3.1"
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@ import sbt._

object Dependencies {
val x = List(1) // scalafix:ok
def scalafixVersion: String = "0.10.1"
def scalafixVersion: String = "0.10.2"

val all = List(
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.0.202109080827-r",
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.1.202206130422-r",
"ch.epfl.scala" % "scalafix-interfaces" % scalafixVersion,
"io.get-coursier" % "interface" % "1.0.7"
"io.get-coursier" % "interface" % "1.0.8"
)
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.2
sbt.version=1.7.1
9 changes: 6 additions & 3 deletions src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import scalafix.interfaces.{Scalafix => ScalafixAPI, _}
import scalafix.sbt.InvalidArgument

import scala.collection.JavaConverters._
import scala.util.control.NonFatal
import java.io.PrintStream

sealed trait Arg extends (ScalafixArguments => ScalafixArguments)
@@ -88,7 +87,9 @@ class ScalafixInterface private (
def withArgs(args: Arg*): ScalafixInterface = {
val newScalafixArguments = args.foldLeft(scalafixArguments) { (acc, arg) =>
try arg(acc)
catch { case NonFatal(e) => throw new InvalidArgument(e.getMessage) }
catch {
case e: ScalafixException => throw new InvalidArgument(e.getMessage)
}
}
new ScalafixInterface(newScalafixArguments, this.args ++ args)
}
@@ -101,7 +102,9 @@ class ScalafixInterface private (

def rulesThatWillRun(): Seq[ScalafixRule] =
try scalafixArguments.rulesThatWillRun().asScala
catch { case NonFatal(e) => throw new InvalidArgument(e.getMessage) }
catch {
case e: ScalafixException => throw new InvalidArgument(e.getMessage)
}

def validate(): Option[ScalafixException] =
Option(scalafixArguments.validate().orElse(null))
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-scalafix/basic/build.sbt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ inThisBuild(
"org.scalameta" %% "testkit" % "4.3.10" % Test,
"org.scalameta" %% "munit" % "0.7.9" % Test,
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %% "scalatest" % "3.2.12" % Test
"org.scalatest" %% "scalatest" % "3.2.13" % Test
),
scalafixDependencies := List(
// Custom rule published to Maven Central https://github.com/scalacenter/example-scalafix-rule
5 changes: 5 additions & 0 deletions src/sbt-test/sbt-scalafix/custom-config/.test.scalafix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules = [
DisableSyntax
]

DisableSyntax.noSemicolons = true
4 changes: 3 additions & 1 deletion src/sbt-test/sbt-scalafix/custom-config/build.sbt
Original file line number Diff line number Diff line change
@@ -3,4 +3,6 @@ val V = _root_.scalafix.sbt.BuildInfo
scalaVersion := V.scala212
addCompilerPlugin(scalafixSemanticdb)
scalacOptions ++= Seq("-Yrangepos", "-Ywarn-unused")
scalafixConfig := Some(file(".scalafixxx.conf"))

Compile / scalafixConfig := Some(file(".compile.scalafix.conf"))
Test / scalafixConfig := Some(file(".test.scalafix.conf"))
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package example

import java.util.Map
import scala.concurrent.Future

object Example {
implicit val str = null.asInstanceOf[Map.Entry[Int, String]]
}
5 changes: 4 additions & 1 deletion src/sbt-test/sbt-scalafix/custom-config/test
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
> scalafix
-> Compile / scalafix --check
> Test / scalafix --check
> Compile / scalafix
> Compile / scalafix --check
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-scalafix/inconfig/build.sbt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ inThisBuild(
"org.scalameta" %% "testkit" % "4.3.10" % Test,
"org.scalameta" %% "munit" % "0.7.9" % Test,
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %% "scalatest" % "3.2.12" % Test
"org.scalatest" %% "scalatest" % "3.2.13" % Test
),
scalafixDependencies := List(
// Custom rule published to Maven Central https://github.com/scalacenter/example-scalafix-rule