Modified: trunk/Tools/ChangeLog (92333 => 92334)
--- trunk/Tools/ChangeLog 2011-08-03 23:51:03 UTC (rev 92333)
+++ trunk/Tools/ChangeLog 2011-08-03 23:53:54 UTC (rev 92334)
@@ -1,3 +1,13 @@
+2011-08-03 David Levin <le...@chromium.org>
+
+ Rename WEBKIT_API to WEBKIT_EXPORT in check-webkit-style.
+ https://bugs.webkit.org/show_bug.cgi?id=65652
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+
2011-08-03 Filip Pizlo <fpi...@apple.com>
Adding Filip Pizlo to committer list.
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (92333 => 92334)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2011-08-03 23:51:03 UTC (rev 92333)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2011-08-03 23:53:54 UTC (rev 92334)
@@ -1601,19 +1601,19 @@
return
modifiers_and_return_type = function_state.modifiers_and_return_type()
- if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_API\b', modifiers_and_return_type):
+ if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_EXPORT\b', modifiers_and_return_type):
if filename.find('/chromium/public/') == -1:
- error(function_state.function_name_start_position.row, 'readability/webkit_api', 5,
- 'WEBKIT_API should only appear in the chromium public directory.')
+ error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
+ 'WEBKIT_EXPORT should only appear in the chromium public directory.')
elif not file_extension == "h":
- error(function_state.function_name_start_position.row, 'readability/webkit_api', 5,
- 'WEBKIT_API should only be used in header files.')
+ error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
+ 'WEBKIT_EXPORT should only be used in header files.')
elif not function_state.is_declaration or search(r'\binline\b', modifiers_and_return_type):
- error(function_state.function_name_start_position.row, 'readability/webkit_api', 5,
- 'WEBKIT_API should not be used on a function with a body.')
+ error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
+ 'WEBKIT_EXPORT should not be used on a function with a body.')
elif function_state.is_pure:
- error(function_state.function_name_start_position.row, 'readability/webkit_api', 5,
- 'WEBKIT_API should not be used with a pure virtual function.')
+ error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
+ 'WEBKIT_EXPORT should not be used with a pure virtual function.')
check_function_definition_and_pass_ptr(modifiers_and_return_type, function_state.function_name_start_position.row, 'return', error)
@@ -3482,7 +3482,7 @@
'readability/streams',
'readability/todo',
'readability/utf8',
- 'readability/webkit_api',
+ 'readability/webkit_export',
'runtime/arrays',
'runtime/bitfields',
'runtime/casting',
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (92333 => 92334)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2011-08-03 23:51:03 UTC (rev 92333)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2011-08-03 23:53:54 UTC (rev 92334)
@@ -4461,47 +4461,47 @@
'One space before end of line comments'
' [whitespace/comments] [5]')
- def test_webkit_api_check(self):
- webkit_api_error_rules = ('-',
- '+readability/webkit_api')
+ def test_webkit_export_check(self):
+ webkit_export_error_rules = ('-',
+ '+readability/webkit_export')
self.assertEquals('',
- self.perform_lint('WEBKIT_API int foo();\n',
+ self.perform_lint('WEBKIT_EXPORT int foo();\n',
'WebKit/chromium/public/test.h',
- webkit_api_error_rules))
- self.assertEquals('WEBKIT_API should only be used in header files. [readability/webkit_api] [5]',
- self.perform_lint('WEBKIT_API int foo();\n',
+ webkit_export_error_rules))
+ self.assertEquals('WEBKIT_EXPORT should only be used in header files. [readability/webkit_export] [5]',
+ self.perform_lint('WEBKIT_EXPORT int foo();\n',
'WebKit/chromium/public/test.cpp',
- webkit_api_error_rules))
- self.assertEquals('WEBKIT_API should only appear in the chromium public directory. [readability/webkit_api] [5]',
- self.perform_lint('WEBKIT_API int foo();\n',
+ webkit_export_error_rules))
+ self.assertEquals('WEBKIT_EXPORT should only appear in the chromium public directory. [readability/webkit_export] [5]',
+ self.perform_lint('WEBKIT_EXPORT int foo();\n',
'WebKit/chromium/src/test.h',
- webkit_api_error_rules))
- self.assertEquals('WEBKIT_API should not be used on a function with a body. [readability/webkit_api] [5]',
- self.perform_lint('WEBKIT_API int foo() { }\n',
+ webkit_export_error_rules))
+ self.assertEquals('WEBKIT_EXPORT should not be used on a function with a body. [readability/webkit_export] [5]',
+ self.perform_lint('WEBKIT_EXPORT int foo() { }\n',
'WebKit/chromium/public/test.h',
- webkit_api_error_rules))
- self.assertEquals('WEBKIT_API should not be used on a function with a body. [readability/webkit_api] [5]',
- self.perform_lint('WEBKIT_API inline int foo()\n'
+ webkit_export_error_rules))
+ self.assertEquals('WEBKIT_EXPORT should not be used on a function with a body. [readability/webkit_export] [5]',
+ self.perform_lint('WEBKIT_EXPORT inline int foo()\n'
'{\n'
'}\n',
'WebKit/chromium/public/test.h',
- webkit_api_error_rules))
- self.assertEquals('WEBKIT_API should not be used with a pure virtual function. [readability/webkit_api] [5]',
+ webkit_export_error_rules))
+ self.assertEquals('WEBKIT_EXPORT should not be used with a pure virtual function. [readability/webkit_export] [5]',
self.perform_lint('{}\n'
- 'WEBKIT_API\n'
+ 'WEBKIT_EXPORT\n'
'virtual\n'
'int\n'
'foo() = 0;\n',
'WebKit/chromium/public/test.h',
- webkit_api_error_rules))
+ webkit_export_error_rules))
self.assertEquals('',
self.perform_lint('{}\n'
- 'WEBKIT_API\n'
+ 'WEBKIT_EXPORT\n'
'virtual\n'
'int\n'
'foo() = 0;\n',
'test.h',
- webkit_api_error_rules))
+ webkit_export_error_rules))
def test_other(self):
# FIXME: Implement this.