Skip to content

Commit

Permalink
Merge pull request #1979 from bjaglin/silencer
Browse files Browse the repository at this point in the history
fix UnusedScalafixSuppression warnings on Scala 3 scalafix invocations
  • Loading branch information
bjaglin committed May 1, 2024
2 parents 8bde76c + 22f09a4 commit b5230fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion project/Mima.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Mima {
ProblemFilters.exclude[Problem]("scalafix.internal.*"),
ProblemFilters.exclude[Problem]("scala.meta.internal.*"),
// Exceptions
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.Versions.scala211")
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.v0.Signature#Self.syntax")
)
}
}
6 changes: 2 additions & 4 deletions scalafix-core/src/main/scala/scalafix/v0/Signature.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ object Signature {
}

final case class Self(name: String) extends Signature {
override def syntax =
throw new UnsupportedOperationException(
"No longer supported."
) // scalafix:ok
override def syntax: String =
throw new UnsupportedOperationException("No longer supported.")
override def structure: String = s"""Signature.Self("$name")"""
override def toString: String = syntax
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ package test
object DenotationOpsTest {
def m(x: Int, y: String): List[String] = List(y)
var x = true
val y = m(42, "hey")
private val y = m(42, "hey")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package test

class TypesTest {
val a = 42
val b = List(42)
private val b = List(42)
class Inner
val c = new TypesTest
val d = new c.Inner
val e = null.asInstanceOf[TypesTest#Inner]
private val e = null.asInstanceOf[TypesTest#Inner]
val f: {
def foo(a: Int): Int
def bar(a: Int): Int
Expand Down

0 comments on commit b5230fd

Please sign in to comment.