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

Baseline formatter upon Quarkus format #13

Merged
merged 14 commits into from
Jan 23, 2025
Merged

Conversation

rnc
Copy link
Contributor

@rnc rnc commented Jan 22, 2025

This updates the formatter (and renames them) to be based upon the Quarkus ide-config from https://github.com/quarkusio/quarkus/blob/main/independent-projects/ide-config/src/main/resources/eclipse-format.xml but then reapplies the PNC specific changes from the PRs. Combined with prior PRs, it makes a single location that is accessible by plugins to format code without having to copy the Eclipse formatter xml everywhere.

@rnc rnc requested a review from thescouser89 January 22, 2025 17:32
@thescouser89
Copy link
Contributor

I'm not sure I'll be the best person to review this one. We'll have to loop in the entire PNC team to comment on the Quarkus Java format and if we're ok with it!

@thescouser89
Copy link
Contributor

image
image
image

Looking at the diffs the new java-formatter.xml introduces, I see that the arguments of a method should now be aligned to the opening bracket '(' of the method.

Apart from that, there are no other changes.

I personally prefer the PNC way but that's a personal preference. I do like that it seems the Quarkus java-formatter.xml is using the latest format, even though I'm not sure what changed between format versions haa! :)

@rnc
Copy link
Contributor Author

rnc commented Jan 23, 2025

Looking at the diffs the new java-formatter.xml introduces, I see that the arguments of a method should now be aligned to the opening bracket '(' of the method.

Apart from that, there are no other changes.

I personally prefer the PNC way but that's a personal preference. I do like that it seems the Quarkus java-formatter.xml is using the latest format, even though I'm not sure what changed between format versions haa! :)

I am slightly surprised that there are no other changes to be honest! I've gone back over the file and found a missing alignment in org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation which might resolve your issue. I've also updated the profile name to PNC.

I've also updated the README with matching examples for spotless and formatter-maven-plugin.

@thescouser89 Can you loop in appropriate people please?

@thescouser89
Copy link
Contributor

@michalovjan @janinko @pkocandr @vibe13 Do you have any opinions on the new format? I think overall it's the same as what we have currently, but updated to the latest eclipse codestyle version.

@thescouser89
Copy link
Contributor

Ran it through several PNC projects and everything looks good! I'll just merge it!

@thescouser89 thescouser89 merged commit 4b263d0 into project-ncl:main Jan 23, 2025
2 checks passed
@rnc rnc deleted the FORMAT branch January 23, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants