astyle / uncrustify

Miklos Vajna vmiklos at collabora.co.uk
Tue Nov 12 08:35:51 PST 2013


Hi Thorsten,

On Tue, Nov 12, 2013 at 05:22:29PM +0100, Thorsten Behrens <thb at documentfoundation.org> wrote:
> And along the 'have more mass-changes' idea - what about uncrustify /
> astyle finally? Fscked-up aligned is at least what irks me the most
> these days. :)

Did you manage to create an astyle config that matches our coding style?

Two random examples:

1) As far as I see in case a method has many parameters our codebase
just indents the next line with 4 spaces. astyle will pad the parameters
to match the leading "(".

Example:
<http://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/rtfattributeoutput.cxx#1064>

2) astyle also insists on indenting multi-line assignment (so that the
next line is padded to match the leading "=").

Example:
<http://opengrok.libreoffice.org/xref/core/writerfilter/source/rtftok/rtfsdrimport.cxx#621>

In neither of these cases it's possible to disable this behavior of
astyle; and obviously reformatting code that has a sane (no idea if we
have strong disagreements on what is sane :) ) formatting is obviously a
bad thing.

I'm happy with following some style rules, but that'll cause some pain
during backporting, so I think the reformatting shouldn't do more than
absolutely necessary.

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131112/9ddbbce2/attachment.pgp>


More information about the LibreOffice mailing list