I have some comments in my code:
//asdf
when I use clang-format on it, it adds a space just after the // characters:
// asdf
How can I prevent that from happening in the clang-format configuration ?
Thanks
Answer
Combining the answers to these two questions should solve the problem:
So the following line in your .clang-format
file should do the trick (I did not test it):
CommentPragmas: '^[^ ]'
That tells clang-format not to mess with comments that start with something other than a space.
For completeness, clang-format documentation here.
No comments:
Post a Comment