Getting Style

David Nolden zwabel at googlemail.com
Sat Apr 21 18:10:59 UTC 2012


Am 21. April 2012 19:41 schrieb Sven Brauch <svenbrauch at googlemail.com>:
>>> okay, starting from that configuration:
>>> 1) Do you all really want that "foo( 3 )" spacing style? I find it
>>> ugly and a pain to type, too.
>>
>> I think it's much nicer to read, but indeed a bit annoying to type
>> (this is why we need some automatic code reformatting).
> I agree it is nicer to read if you have nested calls, but if the
> function has only one or two arguments I find it weird... well, like
> everything, it's matter of taste. I raised it because it's currently
> the only thing I personally wouldn't want to work with in my own code
> (I wouldn't like to apply this option to the python plugin code).
>
>>> 5) the current setup indents a closing bracket on another line
>>> (function call), is this intended? I think it's ugly.
>>
>> Can you give an example?
> Yes: http://paste.kde.org/461066/

No clue if uncrustify has an option for this, the setting isn't
intended and I've never seen such code, to me it looks like a wasted
line, why not simply put the closing brace behind the last argument?

Actually, from a logical point of view, the closing-brace _should_ be
indented, because it belongs to a deeper logical unit than the
value-declaration (it belongs to the initializer). You can verify this
by doing recursive function calls, and especially by line-breaking the
initializer: see http://paste.kde.org/461072/




More information about the KDevelop-devel mailing list