DEV Community

Discussion on: Does anybody know a good working C++ formatting tool?

Collapse
 
voins profile image
Alexey Voinov

Thanks for your reply. Unfortunately, clang-format still cannot do what I want. For example, there's no option for colon to stick to what is there before it. At least, I wasn't able to find it. :)

For now I'm sticking with uncrustify for now. Except for couple of bugs it works quite well.

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Are you referring to the colon of the initialization list specifically? Because, yes, that's in there. I can find it for ya when I get back to the office later, if you like. There's also one related to the ternary conditions.

Thread Thread
 
voins profile image
Alexey Voinov

The one in the class definition. And even then, clang-format doesn't do incremental formatting. :)

And yes, it would be nice to the option name if it is not big trouble for you. Just in case I'll use clang-format sometime later. :) I was able to find only option controlling the break before colon in the initialisation list.

Thread Thread
 
codemouse92 profile image
Jason C. McDonald

Hm, okay. I know there's BreakBeforeInheritanceComma, but that appears to put the colon on the next line. I don't see something for the opposite, so it may indeed not do what you need there. :-\

Thread Thread
 
voins profile image
Alexey Voinov

Precisely. :) But thanks for trying.