xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Re: FOP Style Guide (update)
Date Wed, 08 Jan 2003 15:54:41 GMT
Hi Jörg

On 08.01.2003 16:38:04 J.Pietschmann wrote:
> Jeremias Maerki wrote:
> > I've got the same problem with that. I've found more than a few
> > occurences of that last example in FOP. It would be nice to restrict
> > that rule to one line ifs/fors/whiles. Having more than one line in
> > total should mean having to use braces.
> I don't understand this: It has different semantics.

I'll try...

This should be detected and barked at:

    for (int i = 0; i < 5; i++) {
        doSomething();
        if (amIRight())
            cool();
            doSomethingElse();
    }
    
reason: wrong indentation

...and this, too:

    for (int i = 0; i < 5; i++) {
        doSomething();
        if (amIRight())
            cool();
        doSomethingElse();
    }

reason: if spread over more than one line without braces.

The following should (sorry, could) be ok:

    for (int i = 0; i < 5; i++) {
        doSomething();
        if (amIRight()) cool();
        doSomethingElse();
    }


> > Or if checkstyle could also check indentation...
> That's Jalopy or Emacs reindent for you.

If only everybody would run the formatter...We're facing reality here.
:-)


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Mime
View raw message