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

Relative path remediation completly break pom formatting #520

Closed
jonesbusy opened this issue Dec 28, 2024 · 3 comments
Closed

Relative path remediation completly break pom formatting #520

jonesbusy opened this issue Dec 28, 2024 · 3 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@jonesbusy
Copy link
Collaborator

Plugin Modernizer version

1046.v7cedb_6c8df3f

What Operating System are you using

linux

Reproduction steps

plugin-modernizer dry-run --plugins railflow-testrail --recipe UpgradeToRecommendCoreVersion

Expected Results

Just adding the relative path without much change.

Right now the result is quite catastrophic

  • Empy line
  • Whitespace etc...

Screenshot from 2024-12-28 15-06-28

@jonesbusy jonesbusy added the bug For changelog: Minor bug. Will be listed after features label Dec 29, 2024
@jonesbusy
Copy link
Collaborator Author

jonesbusy commented Dec 29, 2024

If not possible to fix due to parser, what about

mvn spotless:apply -Dspotless.check.skip=false "-DspotlessFiles=.*pom.xml"

after any pom remediation

If the pom is very different we will get a huge diff, but at least the pom.xml will follow best practice ?

@gounthar
Copy link
Collaborator

In the meantime, yes.
I will try with other parsers later on, that may fix the issue.

@jonesbusy
Copy link
Collaborator Author

Fixed by #553 and 550 that either remove condition are use standard regex to perform the update (for example java.level or parent pom). The bom is not needed because we upgrade plugin to the lowest minimum version to compile with Java 8 and then just invoke OpenRewrite.

Some recipe like AddCodeOwner will not work out of the box for outdated plugin but should rather be run from modernization recipes or cookbook #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

2 participants