[cfe-dev] Clang-format: Braces Indent Style Whitesmiths
JVApen
JVApen at gmail.com
Fri Dec 26 10:53:34 PST 2014
Hi all,
I was looking into the clang tools to experiment with; hoping to convince
some colleagues that tooling can save us time.
Anyhow; since I was trying to take baby steps; clang format looked like a
very good start.
Unfortunately, we would not be programmers if we wouldn't do things a bit
different than the rest of the world.
The current code; with too many files; uses the Whitesmiths style
<http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style> at most
places.
Though this is not yet supported by clang format.
Going through the code, adding support for it did not look like a big
thing; since Allman and GNU are very similar.
The thing I did not realize is that both of them indent all code by one
level compared to the {,
which is not done by Whitesmiths style.
I already wrote a unit test, based on the Allman unit test; useful for test
driven development
and experimented already with the code in lib/Format/UnwrappedLineParser.cpp
Though can't seem to find out how to prevent the extra indent;
does anyone with more codebase experience have an idea where to start?
JVApen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141226/67897adb/attachment.html>
More information about the cfe-dev
mailing list