-
Notifications
You must be signed in to change notification settings - Fork 17
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
More XML formatting #131
More XML formatting #131
Conversation
- No target files. - No generated POM files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question
<exclude>**/pom.xml</exclude> | ||
<exclude>**/dependency-reduced-pom.xml</exclude> | ||
<exclude>**/gradle.xml</exclude> | ||
<exclude>**/target/</exclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding these excludes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It's not to format those XML files. The ones in target don't get stored in Git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pom.xml
was already there. I just fixed the path pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency reduced pom doesn't get stored in Git either. I guess we could format these if we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a particular opinion here 🙂 but why do we need to skip formatting? Does it lead to a bad format? Or does it make Spotless take too long to run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the files not stored in Git, right, it's to save time; the generated XML files can be quite large. With the others, let me try it and see how it looks. I cannot remember now why we originally skipped pom.xml
, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like at least pom.xml
was excluded here: d74b32b. The comment says:
Ignore pom.xml in XML formatting.
We have another formatter for that.
I am guessing that m2e is doing it's own formatting each time the file is edited using m2e. Other than that, I can't recall what other formatter we could be using ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I find this more readable.