Skip to content

Commit

Permalink
overhaul ScalafixArgumentsSuite to test Scala 3
Browse files Browse the repository at this point in the history
- avoid side effects & input duplication by using a fixture function
- ExplicitResultsTypes -> RemoveUnused (available in Scala 3)
- ProcedureSyntax (syntax not even supported in 3) -> RedundantSyntax
- remove tests no longer relevant (Scala 3 is tested everywhere else)
- run tests on windows by removing custom target root (tested elsewhere)
  • Loading branch information
bjaglin committed Aug 18, 2024
1 parent b50724b commit 520a73d
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import scala.tools.nsc.Main

object CompatSemanticdb {

def scalacOptions(src: Path, target: Path): Array[String] = {
Array[String](
s"-P:semanticdb:targetroot:$target"
) ++ scalacOptions(src)
}

def scalacOptions(src: Path): Array[String] = {
Array[String](
"-Yrangepos",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ import dotty.tools.dotc.Main

object CompatSemanticdb {

def scalacOptions(src: Path, target: Path): Array[String] = {
Array[String](
s"-semanticdb-target:$target"
) ++ scalacOptions(src)
}

def scalacOptions(src: Path): Array[String] = {
Array[String](
"-Xsemanticdb"
"-Xsemanticdb",
s"-sourceroot:$src"
)
}

Expand Down
Loading

0 comments on commit 520a73d

Please sign in to comment.