WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
96797
[WK2] Order includes according to style guide
https://bugs.webkit.org/show_bug.cgi?id=96797
Summary
[WK2] Order includes according to style guide
Kenneth Rohde Christiansen
Reported
2012-09-14 09:28:38 PDT
Let's order the includes with my little script. Checked with check-webkit-style.
Attachments
Patch
(55.69 KB, patch)
2012-09-14 09:30 PDT
,
Kenneth Rohde Christiansen
no flags
Details
Formatted Diff
Diff
Script
(3.51 KB, text/plain)
2012-09-14 09:37 PDT
,
Kenneth Rohde Christiansen
no flags
Details
Patch
(55.29 KB, patch)
2012-09-14 09:45 PDT
,
Kenneth Rohde Christiansen
benjamin
: review-
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Rohde Christiansen
Comment 1
2012-09-14 09:30:15 PDT
Created
attachment 164167
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2012-09-14 09:37:20 PDT
Created
attachment 164172
[details]
Script If anyone knows python better than me, this script can probably be fixed up and included in Tools/Scripts
Kenneth Rohde Christiansen
Comment 3
2012-09-14 09:39:42 PDT
The script can be used like this: find Source/WebKit2 -name '*' | xargs reorder-includes.py
Chris Dumez
Comment 4
2012-09-14 09:40:21 PDT
Comment on
attachment 164167
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=164167&action=review
> Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm:27 > +#import <wtf/Platform.h>
I believe this one should be after the blank line.
> Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h:25 > +#include "qwebkitglobal.h"
I'm not familiar with Qt port but should "qwebkitglobal.h" always be first? like "config.h"?
Kenneth Rohde Christiansen
Comment 5
2012-09-14 09:41:17 PDT
(In reply to
comment #4
)
> (From update of
attachment 164167
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=164167&action=review
> > > Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm:27 > > +#import <wtf/Platform.h> > > I believe this one should be after the blank line. > > > Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h:25 > > +#include "qwebkitglobal.h" > > I'm not familiar with Qt port but should "qwebkitglobal.h" always be first? like "config.h"?
Yeah it should. I can make an exception for that in the script
Kenneth Rohde Christiansen
Comment 6
2012-09-14 09:45:35 PDT
Created
attachment 164173
[details]
Patch
WebKit Review Bot
Comment 7
2012-09-14 09:48:42 PDT
Attachment 164173
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h:25: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 84 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 8
2012-09-14 09:49:39 PDT
LGTM.
Early Warning System Bot
Comment 9
2012-09-14 10:26:53 PDT
Comment on
attachment 164173
[details]
Patch
Attachment 164173
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13850610
Kenneth Rohde Christiansen
Comment 10
2012-09-14 11:05:33 PDT
Seems that some have issues with includes depending on order. Simon, can you have a look at Qt?
Simon Hausmann
Comment 11
2012-09-14 14:01:31 PDT
Comment on
attachment 164173
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=164173&action=review
> Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h:24 > +#include "qwebkitglobal.h"
qwebkitglobal.h provides us with the QWEBKIT_EXPORT macro. All that we need is that it is defined before the class declaration starts, but otherwise it can be included in any order. Feel free to shuffle it around to make check-webkit-style happy :)
Benjamin Poulain
Comment 12
2013-01-08 20:02:25 PST
Comment on
attachment 164173
[details]
Patch This likely needs a rebaseline. And it should make the style bot happy. Ping someone when you update so that it does not stay in queue forever.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug