That's exactly what we do with all our projects here at UW/PLSE.
Mark

-----Original Message-----
From: James Ring [mailto:s...@jdns.org] 
Sent: Friday, September 13, 2019 6:44 AM
To: Commons Developers List <dev@commons.apache.org>
Subject: Re: [CONFIGURATION] Formatting braces

What about https://github.com/google/google-java-format ? Just require that it 
be run on check-in, all these style questions go away (as a bonus, it looks 
nice too).

On Wed, Sep 11, 2019 at 6:54 AM Gary Gregory <garydgreg...@gmail.com> wrote:
>
> Hi All:
>
> I only hope that this will not turn into a bike shedding thread...
>
> Commons Configuration is one of the few components we have that uses 
> the formatting rule (enforced by Checkstyle) where braces must be on 
> separate lines. In the age of lambdas, this is, IMO, lame (a technical 
> term ;-) for
> example:
>
>     public static final ConfigurationConsumer<ConfigurationException>
> DEFAULT_INCLUDE_LISTENER = e ->
>     {
>         throw e;
>     };
>
>     public static final ConfigurationConsumer<ConfigurationException>
> NOOP_INCLUDE_LISTENER = e ->
>     {
>         // noop
>     };
>
> Instead of:
>
>     public static final ConfigurationConsumer<ConfigurationException>
> DEFAULT_INCLUDE_LISTENER = e -> { throw e; };
>
>     public static final ConfigurationConsumer<ConfigurationException>
> NOOP_INCLUDE_LISTENER = e -> { /* noop */ };
>
> I propose a reformatting to use the "{ on the same line" which means 
> that blocks go from:
>
> if (test)
> {
>    // this
> }
> else
> {
>   // that
> }
>
> to:
>
> if (test) {
>    // this
> } else {
>   // that
> }
>
> and so on.
>
> Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to