Created attachment 34940 [details] Patch v1 Reviewed by NOBODY (OOPS!). In <http://webkit.org/b/28355#c1>, it was noted that new source files use 'using namespace std;' instead of individual 'use std::foo;' statements. This adds a level 4 check for such statements. * Scripts/modules/cpp_style.py: (_ERROR_CATEGORIES): Added 'build/using_std'. (check_using_std): Added. (check_style): Added call to check_using_std(). * Scripts/modules/cpp_style_unittest.py: (WebKitStyleTest.test_using_std): Added unit test. --- 3 files changed, 54 insertions(+), 0 deletions(-)
(In reply to comment #0) > In <http://webkit.org/b/28355#c1>, it was noted that new source > files use 'using namespace std;' instead of individual > 'use std::foo;' statements. This adds a level 4 check for such > statements. That should be 'using std::foo;' in the ChangeLog comment. Already fixed locally.
Comment on attachment 34940 [details] Patch v1 > + 'Use \'using namespace std;\' instead of \'using std::%s;\'.' % method_name) Consider using "" for the outer quotes to avoid the \' because it makes it easier to read. Like this: "Use 'using namespace std;' instead of 'using std::%s;'." % method_name) > diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/modules/cpp_style_unittest.py > + 'Use \'using namespace std;\' instead of \'using std::min;\'.' Consider using "" for the outer quotes to avoid the \'.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebKitTools/ChangeLog M WebKitTools/Scripts/modules/cpp_style.py M WebKitTools/Scripts/modules/cpp_style_unittest.py Committed r47346 M WebKitTools/ChangeLog M WebKitTools/Scripts/modules/cpp_style_unittest.py M WebKitTools/Scripts/modules/cpp_style.py r47346 = b78d6ef8825272cc9ccf21957ae16d96d64080c7 (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/47346
All reviewed patches have been landed. Closing bug.