-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix UnusedScalafixSuppression warnings on Scala 3 scalafix invocations
Since ExplicitResultTypes is unavailable in Scala 3, some silencers are rightfully detected as unused for that invocation. Qualifying these silencers by suffixing ExplicitResultTypes does not help, since EscapeHatch is not aware of which rules are executed, so we need to address the problem differently. - For the (v0) signature, this removes the silencer to be explicit about the type since there is no reason (except compatibility) to keep it this way. Since this is the old API and a very specific class, it's unlikely that will will cause linking errors when running community rules with existing versions. - For test suites where we DO want an explicit type, this turns private the terms that ExplicitResultTypes warns on to stop triggering it. However, this triggers RemoveUnused, but since it is now common to both Scala 2 and Scala 3 and, it does not trigger UnusedScalafixSuppression in any invocation.
- Loading branch information
Showing
4 changed files
with
6 additions
and
8 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