Hi devs,
Indentation
I know we already voted this but since it was a long time ago, I’d like to make sure we’re all in agreement.
We used the Checkstyle <module name="Indentation"/>
check (see https://checkstyle.sourceforge.io/config_misc.html#Indentation).
However until Checkstyle 6.3 we couldn’t enforce the indentation for line wrapping (that we defined at a strict 4 in the past).
So I’m proposing to:
- Configure it in checkstyle.xml
- Reformat our files accordingly
Left Curly
Right now we have:
<module name="LeftCurly">
<property name="option" value="nl"/>
<property name="tokens" value="CLASS_DEF,INTERFACE_DEF"/>
</module>
I’m proposing to add the following missing ones which correspond to our usage:
- https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF
- https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF
- https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF (not sure)
- https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF
WDYT?