Sigh, if only there was a formatter for Swift but the language keeps changing and no one at Apple finds time to work on this.
Re:Clang-format configurator
by bigcheesegs on Saturday October 31, 2015 @03:19AM
(#10482081)
There's a hard rule for clang-format to only change white space so as not to accidentally make semantic changes. There is however another tool, clang-tidy, for that use case.
We had a lot of issues with Uncrustify and I burned a lot of time trying to deal with its bugs. Clang-format can't do everything that Uncrustify can do, but I've had a lot less problems with it. The only thing I really miss is Uncrustify would do more than format white-space. It would make code alterations such as inserting missing block braces, etc.
My .clang-format config[0] is also much smaller and understandable as well.
[0] https://gist.github.com/mmcdole/e174ba6bede7760cee11