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

Fix Dependabot removes double backslashes in maven plugin configurations #5835

Conversation

mallowlabs
Copy link
Contributor

Problem

Dependabot removes backslashes in maven pom.
This PR will fix it.

pr

Example PR: mallowlabs/dependabot-maven-double-backslashes-test#1

Reason

String#gsub escapes double backslashes.
Using block prevents this problem.

irb(main):001:0> "\\\\".gsub("\\\\","\\\\")
=> "\\"
irb(main):001:0> "\\\\".gsub("\\\\") { "\\\\" }
=> "\\\\"

Background

I use spotless-maven-plugin.
The importOrder configuration contains \\#.

https://github.com/diffplug/spotless/blob/7667a849d377b546d45350b77b65e0793e3d17dc/plugin-maven/README.md?plain=1#L184

@mallowlabs mallowlabs marked this pull request as ready for review October 5, 2022 11:11
@mallowlabs mallowlabs requested a review from a team as a code owner October 5, 2022 11:11
jeffwidman
jeffwidman previously approved these changes Oct 6, 2022
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including a test with this PR.

I've got a queue of PR's I'm trying to deploy/merge the next day or two, but will try to get this landed soon.

@jeffwidman jeffwidman dismissed their stale review October 6, 2022 00:29

CI failure

@jeffwidman
Copy link
Member

Looks like there's a lint issue, can you fix?

@mallowlabs mallowlabs force-pushed the fix-escape-double-backslashes-in-maven-plugin branch from 55413be to 88c6ef3 Compare October 6, 2022 02:51
@mallowlabs
Copy link
Contributor Author

@jeffwidman
I have fixed the lint issue and rebased! 88c6ef3

Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks. I'll try to get this deployed in the next few days and then assuming it looks good will merge it back to main

@jeffwidman jeffwidman force-pushed the fix-escape-double-backslashes-in-maven-plugin branch from 88c6ef3 to 0dc459f Compare October 7, 2022 05:14
@jeffwidman jeffwidman merged commit ca5756f into dependabot:main Oct 7, 2022
@pavera pavera mentioned this pull request Oct 31, 2022
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.

2 participants