-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Run all integration tests - deprecate `scalafixScalaBinaryVersion` in favor of `scalaVersion` - deprecate `fixAction` overloads which take scalaBinaryVersion as a parameter Pull Request: #205 Commits: * scalaVersion to Scalafix as needed for Scalafix 0.13.0 * Fix fix-2.12 test * Use Scala 3.5 specific feature in test Co-authored-by: Brice Jaglin <bjaglin@gmail.com> * Remove debug print Co-authored-by: Brice Jaglin <bjaglin@gmail.com> * Add deprecated overload instead of using `@nowarn` * Fix custom-rule test * Fix tests * Remove debug print --------- Co-authored-by: Brice Jaglin <bjaglin@gmail.com>
- Loading branch information
Showing
7 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rules = [ | ||
ExplicitResultTypes | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import $file.plugins | ||
import com.goyeau.mill.scalafix.ScalafixModule | ||
import mill._ | ||
import mill.scalalib._ | ||
import os._ | ||
|
||
object project extends ScalaModule with ScalafixModule { | ||
def scalaVersion = "3.5.1" | ||
} | ||
|
||
def verify() = | ||
T.command { | ||
val fixedScala = read(pwd / "project" / "src" / "Fix.scala") | ||
val expected = """object Fix { | ||
| // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used | ||
| // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals | ||
| def myComplexMethod: Map[Int, String] = 1.to(0B1010).map(i => i -> i.toString).toMap | ||
|} | ||
|""".stripMargin | ||
assert(fixedScala == expected) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
object Fix { | ||
// use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used | ||
// https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals | ||
def myComplexMethod = 1.to(0B1010).map(i => i -> i.toString).toMap | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters