Team members use at least 2 IDEs: Eclipse IDE and IntelliJ IDEA. These 2 IDEs have different formatting and import organizing rules. To avoid formatting related issues in the PRs the proposal is to use agreed Formatter and Organize Imports settings.
Formatter
The attached eclipse-profile.xml is based on default built-in Eclipse formatter profile with a few changes:
- Indentation
- size is 2
- tab size is 2
- tabulation format is spaces
- Line length size is 132 - this allows to work with main Editor seeing entire line even with a lot of active panels (like on screenshot)
The main customization is in method invocation settings (see screenshot):
Line wrapping policy: Wrap all elements, except first element if not necessary
Force split, even if line shorter than maximum line width
Indentation policy: Indent by one
How to use
The attached eclipse-profile.xml can be used as folling:
- IntelliJ IDEA: by enabling Eclipse Code Formatter plugin and follow instructions.
- Eclipse: refer to Code Formatter Preferences
Organize Imports
Eclipse default settings are:
...