Jeremias Maerki wrote:
Since I've made the checkstyle.cfg file an integral part of our style
guide I have to bring this up before changing:

I'd like to add a line "checkstyle.ignore.braces = yes". This enables
one line ifs like the following:

if (isEnabled()) return true;

Without this line, you have to write:

if (isEnabled()) {
    return true;
}

Please speak up if the change is unwelcome. Thanks.
Jeremias,

The change is most welcome.

if (isEnabled()) {
    return true;
}

is absurd.  However, if I can do

if (isEnabled()) return true;

should I not be able to do

if (isEnabled() && someOtherVerboseCondition())
    return true;

and also

if (isEnabled)
    doOneLiner();
else
    return false;

which is easier to read than

if (isEnabled()) doOoneLiner();
else return false;

Peter
--
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to