-
Notifications
You must be signed in to change notification settings - Fork 91
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
Xml comments are formatted after upgrade 2.17.0 -> 2.24.1 #936
Comments
This is the default config file. If you need different, you need to override the default. See https://code.revelc.net/formatter-maven-plugin/examples.html on how to override. |
Hi, yes I’m aware of that file, but I can not find any configuration which is related to the sort of comments. Is there any descriptions of the properties? |
What is your override config if any? If none, its treating tabs as spaces by default. The items while slight variations in name match up to what you see in Eclipse. In fact the code was lifted from eclipse years ago when it was added here. Code for it is here https://github.com/revelc/xml-formatter/. See https://github.com/revelc/xml-formatter/releases, there was a bug with formatting fixed which is in 2.24.1. Have you tried others post 2.17.0 to isolate where it started? |
This is our current configuration, it is based on the https://github.com/revelc/formatter-maven-plugin/blob/main/src/main/resources/formatter-maven-plugin/eclipse/xml.properties a few years ago. it has not been updated with latest. No I have not tried to pinpoint where the fault started, I can try to do that. maxLineLength=300 |
I have now tested all version between 2.17.0 and 2.24.1, the problem started with 2.24.1, so it seems to work fine with 2.24.0 |
Thanks for confirming. I'll use your example to find a fix. I suspect its due to tabs which where most likely not accounted for in fixing a separate spacing issue.
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: martinaldrin ***@***.***>
Sent: Wednesday, September 11, 2024 7:54:53 AM
To: revelc/formatter-maven-plugin ***@***.***>
Cc: Jeremy Landis ***@***.***>; Comment ***@***.***>
Subject: Re: [revelc/formatter-maven-plugin] Xml comments are formatted after upgrade 2.17.0 -> 2.24.1 (Issue #936)
I have now tested all version between 2.17.0 and 2.24.1, the problem started with 2.24.1, so it seems to work fine with 2.24.0
—
Reply to this email directly, view it on GitHub<#936 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHODI7DIX7ZJQZCHMN7DEDZWAVQ3AVCNFSM6AAAAABNVZD7AGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTGQ3DCMBZG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Not sure when I can get to this. I think you want to stick to 2.23.0 for time being as there was a bug in 2.24.0. I'm sorry we don't have release notes up here, I have been unable to get consensus as to why that is so utterly important. All we are left with is digging through this milestones which may not be entirely accurate https://github.com/revelc/formatter-maven-plugin/milestones?state=closed. The real issue here is not the formatter here but xml-formatter project and we do have to get a number of components out to even get the eclipse 2024-06 release out and now 2024-09 is out from eclipse. So we are a bit behind here. I've been sick last few days and was hoping to address this weekend but not looking like I'll get to it. I just want to make sure you can work successfully for now until this is remediated. Thanks. |
2.23.0 can not be used either, it is broken for xml formatting. So I will try to use 2.22.0 for now |
ok thanks. Do report back what ends up working for you temporarily to help others. |
Describe the bug
We have started to get comments in xml formatted after we uplift the version and we can not find any configuration to disable this.
Versions (OS, Maven, Java, and others, as appropriate):
Maven 3.9.9
Java 21
Readhat 8
To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
Comment out xml tags .
Expected behavior
to not remove the indentation of comment out xml tags. or a property to disable this feature
Screenshots
If applicable, add screenshots to help explain your problem.
In eclipse it is possible to configure if we want to format comments or not, and this configuration I miss in the maven formatter.
Additional context
The text was updated successfully, but these errors were encountered: