Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demonstrate usage of different conf files per sbt config #305

Merged
merged 1 commit into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -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