2
votes

I have a large code base that I want to standardise the indent width for. How can I do this with clang-format without making other changes?

Passing -style='{IndentWidth: 2}' to clang-format

makes other changes to the source files as -dump-config implies.

1

1 Answers

2
votes

clang-format doesn't support that at all. You might get somewhat close to that by setting "ColumnLimit: 0" which will make clang-format accept the existing line breaks to a certain extent.