Uncrustify 0.59
:
# Whether to indent the stuff after a leading class colon.
# The term "class colon" refers to both 'class Dog: public Animal'
# ^
# and 'Dog::Dog(): Animal(), _fur(BLACK)'.
# ^
indent_class_colon = true
# Add or remove a newline around a class colon.
# Related to <pos_class_colon>, <nl_class_init_args>, and <pos_comma>.
nl_class_colon = force
# Add or remove newline after each ',' in the constructor member initialization.
nl_class_init_args = force
Currently, Uncrustify
is the most flexible and configurable beast that I am aware of. I've tried tones of different code formatters in the past, including non-free ones. However, I found them to be either lacking some vital options or containing nasty bugs, these include: built-in code formatter of Eclipse CDT, AStyle, Jindent, and some others.