Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scalafix rules for 0.4.x -> 0.5.x #232

Conversation

CJSmith-0141
Copy link
Contributor

This is just like the last PR, but with way less noise!

@CJSmith-0141 CJSmith-0141 requested a review from a team as a code owner January 2, 2024 17:55
(cherry picked from commit 9ea606f)
@bpholt
Copy link
Member

bpholt commented Jan 2, 2024

Thanks @CJSmith-0141, I was going to suggest something similar. I'm waiting for a colleague to review #211, and then I'll merge that into series/0.5.

This is a great start to the Scalafix. I have a test case that covers more of the encrypt API, so we can probably get this merged and then finish up with that those additional Scalafix cases, and then I think we'll be in pretty good shape. I'll push that test case up on another branch just for reference.

@bpholt bpholt deleted the branch Dwolla:encrypt-multiple-recipients January 2, 2024 20:44
@bpholt bpholt closed this Jan 2, 2024
@bpholt
Copy link
Member

bpholt commented Jan 2, 2024

I'm not sure why this was closed… maybe because the original target branch was deleted when #211 was merged? 🤔

In any event, @CJSmith-0141 can you retarget this at series/0.5 and reopen it? It doesn't looks like it will let me do that.

@bpholt
Copy link
Member

bpholt commented Jan 2, 2024

I pushed up the initial Scalafix test I wrote to the start-scalafix branch.

Input:

.through(alg.encrypt(
key,
tagChunkSize(untaggedChunkSize),
Option("filename"),
Encryption.Aes256,
Compression.Bzip2,
PgpLiteralDataPacketFormat.Utf8,
))
.through(alg.armor())

Expected output (I'm open to different formatting for this; it's just where I started):

.through(alg.encrypt(
EncryptionConfig()
.withChunkSize(ChunkSize(untaggedChunkSize))
.withFileName(Option("filename"))
.withEncryption(Encryption.Aes256)
.withCompression(Compression.Bzip2)
.withPacketFormat(PgpLiteralDataPacketFormat.Utf8),
key,
))
.through(alg.armor)

If I comment out everything except for Option("filename"), in the input, the Scalafix as described in this PR looks like it works, so I think it's just a matter of adding support for those other optional parameters.

Copy link
Contributor

mergify bot commented Jan 2, 2024

⚠️ The sha of the head commit of this PR conflicts with #233. Mergify cannot evaluate rules on this PR. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants