I want to use clang-format to align my comments, but nothing else.
The option for that is: AlignTrailingComments (bool)
.
But when I run the following:
clang-format-3.6 -i -style='{AlignTrailingComments: true}' <file>
It performs all kinds of other formatting options that I suppose have a default when unspecified.
How can I execute just one clang formatting rule on the codebase?
Having all of these defaults make it difficult to see the full effect that a single formatting option has on the code. I have to parse through the diff of all these other changes and decide if it was the option I specified that actually did it.
I noticed that there is a DisableFormat option, but no matter how I use it, it stops any formatting from happening at all.
clang-format-3.6 -i -style='{AlignTrailingComments: true, DisableFormat: true}'
clang-format-3.6 -i -style='{DisableFormat: true, AlignTrailingComments: true}'
Both cause clang-format to not make any code anywhere.
BasedOnStyle
– Hugues