Skip to content

Inconsistent Java formatters #28519

@olcbean

Description

@olcbean

Having incomplete formatting rules makes PR review process difficult.

In CONTRIBUTING only two changes are mentioned, and The rest is left to Java coding standards. Unfortunately there are differences between Eclipse and IntelliJ defaults. Moreover there are 3 build-in profiles in Eclipse : all slightly different.

Here are a few examples :

  • Indentation for wrapped line :
    in Eclipse all three build-in profiles set it to 2
    in IntelliJ it is set to 1 ( Use non deprecated xcontenthelper #28503 (comment) )
  • Eclipse : Maximum width of comments is 80 ( although most of the comments are using 140 )
  • Eclipse : White spaces in Arrays initializers is different for the different Eclipse build-in profiles ( "after opening brace" and "before closing brace" ) : new int[]{1, 2, 3}; vs new int[]{ 1, 2, 3 };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions