incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Morel (Commented) (JIRA)" <>
Subject [jira] [Commented] (S4-19) Define and implement enforceable coding standards
Date Wed, 26 Oct 2011 18:15:33 GMT


Matthieu Morel commented on S4-19:

I added a proposal for coding and formatting rules. See

1. a checkstyle configuration file, that can be used by IDE plugins, and that I also added
to the gradle build chain. Only runs when specifically called ("gradle check"). To be integrated
in CI.

This checkstyle configuration is based on the default one from checkstyle, and slightly modified,
mostly by: removing rules such as "no empty line" , allowing "logger" as a valid name for
private static final variables etc...

2. a code formatting configuration file for eclipse, mostly from what checkstyle generates
for eclipse . 

I think this is currently our best option for a formatting standard, because :
- it can be used in eclipse, 
- but also in intellij (through the "external code formatter" plugin), 
- and even standalone. (And therefore could also integrate formatting checks in CI).

To automatically format code in eclipse (this is configurable on a per-project basis) :
1. preferences --> Java --> Code style --> Formatter , then import s4/config/eclipse/s4-eclipse-format.xml
2. preferences --> Java --> Editor --> Save actions --> "format source code" "format
all lines"

Once we agree on the standards, we can reformat all the code to make sure it is compliant,
and set up corresponding tasks in continuous integration 
> Define and implement enforceable coding standards
> -------------------------------------------------
>                 Key: S4-19
>                 URL:
>             Project: Apache S4
>          Issue Type: Task
>            Reporter: Matthieu Morel
>            Priority: Minor
> - we should follow some standard rules for coding and formatting. 
> - they should be automatically applicable in development environments (no manual formatting
/ reloading etc...)
> - they have to be enforced automatically, breaking the build or triggering alerts in
case of failure
> Note: there is already a set of guidelines suggested by Leo on the developers mailing
list, but this current ticket is for standards that can be automatically verified.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message