1) use ben's config as a starting point
2) change the following properties:
nl_class_init_args=force
pos_comma=trail
pos_class_comma=lead
3) try to format the following code:
class NavigatedScreen: public UIScreen/*somecomment*/, public SomeClass
4) that's what you get:
class NavigatedScreen : public UIScreen
, /*somecomment*/ public SomeClass
/somecomment/ changed it position relative to comma and now it looks like it's related to SomeClass, not to UIScreen!
Something happened to the formatting and I can't find a way to edit bug desription. So I'll just try to repost formatted code as a comment:
Code in point 3 is:
and what I get after formatting looks like this:
Last edit: Pavel Busko 2015-12-18
You need to use the option pos_comma=lead_force
The thing is that I don't want - in our code style we want to have trailing comma everywhere except for constructor initialization list and class base list.
If pos_comma can't contradict pos_class_comma this fact should be explicitly mentioned in documentation.
Thanks for the bug.
Bug # 657 is fixed.
Takes care of the option pos_class_comma.
Have a look at https://github.com/gmaurel/uncrustify4Qt.git
2016-02-13 17:48:59
Thanks!