RESOLVED FIXED 183302
Add clang-format configuration
https://bugs.webkit.org/show_bug.cgi?id=183302
Summary Add clang-format configuration
Don Olmstead
Reported 2018-03-02 13:51:08 PST
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.
Attachments
Patch (3.76 KB, patch)
2018-03-02 13:52 PST, Don Olmstead
no flags
Don Olmstead
Comment 1 2018-03-02 13:52:02 PST
Don Olmstead
Comment 2 2018-03-02 13:53:44 PST
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.
Ryosuke Niwa
Comment 3 2018-03-02 14:05:40 PST
Comment on attachment 334924 [details] Patch rs=me
WebKit Commit Bot
Comment 4 2018-03-02 14:13:16 PST
Comment on attachment 334924 [details] Patch Clearing flags on attachment: 334924 Committed r229189: <https://trac.webkit.org/changeset/229189>
WebKit Commit Bot
Comment 5 2018-03-02 14:13:17 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-03-02 14:14:23 PST
Note You need to log in before you can comment on or make changes to this bug.