Clang format has a WebKit style available which seems to be mostly correct. I'm proposing we add a root .clang-format so it can be integrated into a developer's workflow. Any bugs we encounter we should open up issues on the LLVM tools repo until we're at a point where its a 100% correct.
Created attachment 334924 [details] Patch
Comment on attachment 334924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334924&action=review This file was created by running the following clang-format --dump-config -style=WebKit > .clang-format > .clang-format:68 > +IncludeCategories: > + - Regex: '^"config\.h"' > + Priority: -1 > + # The main header for a source file automatically gets category 0 > + - Regex: '.*' > + Priority: 1 > + - Regex: '^<.*\.h>' > + Priority: 2 This is the only part modified from the stock WebKit configuration. If its not present then clang-format won't keep "config.h" configs at the top.
Comment on attachment 334924 [details] Patch rs=me
Comment on attachment 334924 [details] Patch Clearing flags on attachment: 334924 Committed r229189: <https://trac.webkit.org/changeset/229189>
All reviewed patches have been landed. Closing bug.
<rdar://problem/38081690>