-
Notifications
You must be signed in to change notification settings - Fork 363
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
MethodParamPad breaks Jenkinsfile #3783
Comments
hi @hazendaz ; sorry to hear about these issues! I've moved the issue as I think the problem lies in our Groovy handling, not as much the individual recipe. We had a similar report the other day in #3777 and #3737, after we started parsing Jenkinsfiles as Groovy in 4d74818 and 7ed7222. I've asked the team if there's a common fix we can apply to get this resolved, such that you can still target Jenkinsfiles with Java/Groovy recipes, without these issues. As a workaround you can force Jenkinsfiles to be parsed as text by passing in a plaintext mask to the OSS Maven and Gradle plugins, or excluding Jenkinsfiles from parsing for now while we work through this issue. |
In Groovy method calls don't always have parentheses around the arguments. In that case the space between the method name and first argument must not be removed. Fixes: #3783
@timtebeek This issue is still not resolved. I think your PR that you closed #3789 would have solved by simply stop touching Jenkinsfile. Instead comment was made that others fixes correct but none of that did. I've updated every single version since including that from tonight and its still a problem right now. |
Sounds like a very similar case to what we discussed over on openrewrite/rewrite-static-analysis#233 (comment) |
Using static analysis 1.1.2 and has been occurring last few versions best I can tell.
Using rewrite-maven-plugin 5.15.2
Only change picked up in repo I'm working with is that it touched my Jenkinsfile unexpectedly. It has taken the trailing space after every occurrence of 'library ' which causes it to be squashed to the next word and thus breaks Jenkins.
Only two recipe's ran as part of this
org.openrewrite.staticanalysis.CodeCleanup
org.openrewrite.java.RemoveUnusedImports
Broken items
library '...'
becomeslibrary'...'
library identifier
becomeslibraryidentifier
The text was updated successfully, but these errors were encountered: