GateIn tries to align with other projects at jboss.org where possible. Therefore code formatting rules were mostly inspired from JBoss AS7 project.
- Line width limit - 128
- Indentation in java files - 4
- Indentation in xml files - 2
Example java file:
Build level enforcement
GateIn leverages maven checkstyle plugin to enforce proper formatting. All rules are explained with comments directly in the config file. Please check the current state here:
More detailed info about specific rules can be obtained in chestyle plugin documentation.
Checkstyle plugin only enforces java files formatting. Formatting of all other files should be validate by person merging commits into git repository.
For each major IDE there is formatting configuration availabe:
Eclipse formatting rules are the most valid and reference ones because it is impossible to provide perfectly matching formatting configuration for IntelliJ IDEA and Netbeans. It is possible and advised to configure IntelliJ IDEA to use Eclipse formatting configuration via plugin like explained here