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

Automate code formatting #184

Open
gaul opened this issue Apr 4, 2023 · 4 comments
Open

Automate code formatting #184

gaul opened this issue Apr 4, 2023 · 4 comments

Comments

@gaul
Copy link
Owner

gaul commented Apr 4, 2023

Checkstyle is great for consistency but annoying for developers. I looked at https://github.com/google/google-java-format some time ago but perhaps there are better alternatives? Suggested by @delanym in #183.

@delanym
Copy link
Contributor

delanym commented Apr 13, 2023

I recommend formatter-maven-plugin. Can you export and upload an Eclipse format XML?

@krzyk
Copy link
Contributor

krzyk commented Apr 13, 2023

Eclipse XML format is a PITA to apply in IntelliJ IDEA (the plugins that exist are subpar in my experience).

@delanym
Copy link
Contributor

delanym commented Apr 13, 2023

Well that is the only option with this plugin, and I know IntelliJ can import & export to that directly. If it misses a few properties I can live with that. Anyway, I use the Adaptor for Eclipse Code Formatter which ensures full compat and I've got no complaints. Save actions are the real PITA.

Also suggest the impsort-maven-plugin.

@Serranya
Copy link
Contributor

My experiences with the formatter-maven-plugin have been positive so far. I know that diffplug/spotless is also a popular option. But it seems like an overkill and just uses the google formatter under the hood anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants