Version 3



    GateIn tries to align with other projects at where possible. Therefore code formatting rules were mostly inspired from JBoss AS7 project.


    General rules

    • 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.


    IDE support

    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