Skip to content

Commit b5230fd

Browse files
authored
Merge pull request #1979 from bjaglin/silencer
fix UnusedScalafixSuppression warnings on Scala 3 scalafix invocations
2 parents 8bde76c + 22f09a4 commit b5230fd

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

project/Mima.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object Mima {
99
ProblemFilters.exclude[Problem]("scalafix.internal.*"),
1010
ProblemFilters.exclude[Problem]("scala.meta.internal.*"),
1111
// Exceptions
12-
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.Versions.scala211")
12+
ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.v0.Signature#Self.syntax")
1313
)
1414
}
1515
}

scalafix-core/src/main/scala/scalafix/v0/Signature.scala

+2-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ object Signature {
5050
}
5151

5252
final case class Self(name: String) extends Signature {
53-
override def syntax =
54-
throw new UnsupportedOperationException(
55-
"No longer supported."
56-
) // scalafix:ok
53+
override def syntax: String =
54+
throw new UnsupportedOperationException("No longer supported.")
5755
override def structure: String = s"""Signature.Self("$name")"""
5856
override def toString: String = syntax
5957
}

scalafix-tests/integration/src/main/scala/test/DenotationOpsTest.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ package test
44
object DenotationOpsTest {
55
def m(x: Int, y: String): List[String] = List(y)
66
var x = true
7-
val y = m(42, "hey")
7+
private val y = m(42, "hey")
88
}

scalafix-tests/integration/src/main/scala/test/TypesTest.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package test
33

44
class TypesTest {
55
val a = 42
6-
val b = List(42)
6+
private val b = List(42)
77
class Inner
88
val c = new TypesTest
99
val d = new c.Inner
10-
val e = null.asInstanceOf[TypesTest#Inner]
10+
private val e = null.asInstanceOf[TypesTest#Inner]
1111
val f: {
1212
def foo(a: Int): Int
1313
def bar(a: Int): Int

0 commit comments

Comments
 (0)