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

[Java] Enable code review and formatting code through Spotless Maven plugin #39712

Closed
davisusanibar opened this issue Jan 20, 2024 · 3 comments
Closed

Comments

@davisusanibar
Copy link
Contributor

Describe the enhancement requested

As Java code increases, it will become increasingly important to implement code formatter best practices. As a result, we will be able to use spotless to:

  • Reviewing code: Spotless can be used to identify issues related to format.
  • Formatting code: Spotless can be used to automatically fix common formatting mistakes, such as spaces, newlines, and unnecessary imports.

This enhancement will propose replacing maven-checkstyle-plugin with spotless-maven-plugin, which is currently used by Java.

Component(s)

Java

@lidavidm
Copy link
Member

What format does Spotless use? google-java-format has the advantage of IDE plugins that help with formatting, too

@davisusanibar
Copy link
Contributor Author

What format does Spotless use? google-java-format has the advantage of IDE plugins that help with formatting, too

We are starting using google-java-format as you could see at https://github.com/davisusanibar/arrow/blob/97e68f5e66d890c34dde89d0727fbc294a82b869/java/pom.xml#L693. Also palantir-java-format is also available.

@vibhatha
Copy link
Collaborator

Closing in favor of the structured issue: #40757

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