[webkit-dev] webkit C++ style checking tool

Shinichiro Hamaji hamaji at chromium.org
Fri Jul 31 19:55:29 PDT 2009

Hi folks,

> Adam Treat, David Levin, Jakob Petsovits, Kenneth Rohde Christiansen, and I
have been working on ./WebKitTools/Scripts/check-webkit-style to check code
for WebKit style violations. Let me introduce the tool to you.

Simply, check your current patch by running the tool:

% ./WebKitTools/Scripts/check-webkit-style

This checks the files you have modified locally. If any style issues are
found in a line that you modified, it outputs a warning for the violation.

If you are using git, you can use the tool for your local commits:

% ./WebKitTools/Scripts/check-webkit-style --git-commit=HEAD~1

You can also run the tool for specified file(s):

% ./WebKitTools/Scripts/check-webkit-style WebCore/rendering/RenderBox.cpp
% ./WebKitTools/Scripts/check-webkit-style WebCore/rendering/*.cpp

I believe this tool can save the time for both reviewers/reviewees, so I'm
inviting you to try it out on your patches. Also, if you find any issues or
desire certain improvements, please file bugs.


PS Special thanks to Albert Wong for getting a WebKit compatible license on
the cpplint.py code, David Kilzer and Eric Seidel for helpful feature
suggestions, and Mark Rowe for nudging us toward a good name for the tool.

Sorry if I missed anyone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090801/1c199c0a/attachment.html>

More information about the webkit-dev mailing list