Sometimes clang-format does this :
SomeType VariableName[] = {Thing1,
Thing2,
Thing3}
and sometimes clang-format does this :
SomeType VariableName[] = {
Thing1,
Thing2,
Thing3}
and a single character change can make it switch between.
Is there any way to control which it does?
I'm building from the latest git source, so the latest options are available.
According to this answer, clang-format
in some step puts as much as possible on a single line, and applies the ColumnLimit
on that.
That would explain the switching between behaviors.
One way to prevent this could be to set ColumnLimit
to 0, with the cost of removing all automatic wrapping. I think it's worth the cost, I'm sure other don't agree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With