Skip to content

More XML formatting#131

Merged
khatchad merged 5 commits into
wala:masterfrom
ponder-lab:contrib_xml_formatting
Jan 24, 2024
Merged

More XML formatting#131
khatchad merged 5 commits into
wala:masterfrom
ponder-lab:contrib_xml_formatting

Conversation

@khatchad
Copy link
Copy Markdown
Collaborator

I find this more readable.

  • Exclude Gradle files from XML formatting.
  • More XML formatting.
  • Apply spotless.

@khatchad khatchad requested a review from msridhar January 23, 2024 20:16
Copy link
Copy Markdown
Member

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Quick question

Comment thread pom.xml
Comment on lines +170 to +173
<exclude>**/pom.xml</exclude>
<exclude>**/dependency-reduced-pom.xml</exclude>
<exclude>**/gradle.xml</exclude>
<exclude>**/target/</exclude>
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

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?

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

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 ...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NM, it's here:

ML/pom.xml

Line 186 in c40ccba

<pom>
.

It's actually already being done by spotless.

Copy link
Copy Markdown
Member

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

LGTM

@khatchad khatchad merged commit adf1894 into wala:master Jan 24, 2024
@khatchad khatchad deleted the contrib_xml_formatting branch January 24, 2024 14:51
khatchad added a commit that referenced this pull request Jul 8, 2025
…re.version-3.5.2

Bump maven.surefire.version from 3.3.1 to 3.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants