-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in the encrypt scalafix, make the selection of an unnamed key paramet…
…er less specific so it works in more cases; refactor
- Loading branch information
Showing
5 changed files
with
66 additions
and
20 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
20 changes: 18 additions & 2 deletions
20
scalafix/output/src/main/scala/example/ShouldBeIgnored.scala
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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
package example | ||
|
||
trait Foo { | ||
def encrypt(request: Int): Unit | ||
def encrypt(key: String, request: Int): Unit | ||
def armor(): Unit | ||
def tagChunkSize(i: Int): Unit | ||
} | ||
|
||
class ShouldBeIgnored(foo: Foo) { | ||
def go(): Unit = foo.encrypt(42) | ||
import foo.* | ||
import Nested.* | ||
|
||
foo.armor() | ||
foo.encrypt("key", 42) | ||
foo.encrypt(key = "key", request = 42) | ||
tagChunkSize(42) | ||
|
||
CryptoAlg[Option] | ||
} | ||
|
||
object Nested { | ||
object CryptoAlg { | ||
def apply[F[_]]: Unit = ??? | ||
} | ||
} |
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