Changeset 73248 in webkit
- Timestamp:
- Dec 3, 2010 12:32:56 AM (13 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r73240 r73248 1 2010-12-03 David Levin <levin@chromium.org> 2 3 Reviewed by Shinichiro Hamaji. 4 5 check-webkit-style: false positive reported for #if macro 6 https://bugs.webkit.org/show_bug.cgi?id=48242 7 8 * Scripts/webkitpy/style/checkers/cpp.py: Adjusted check to avoid 9 all preprocessor commands. 10 * Scripts/webkitpy/style/checkers/cpp_unittest.py: Added test. 11 1 12 2010-12-02 Eric Seidel <eric@webkit.org> 2 13 -
trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
r71989 r73248 1459 1459 1460 1460 # Do not check for more than one command in macros 1461 in_ macro = match(r'\s*#define', line)1462 if not in_ macroand not match(r'((\s*{\s*}?)|(\s*;?))\s*\\?$', rest):1461 in_preprocessor_directive = match(r'\s*#', line) 1462 if not in_preprocessor_directive and not match(r'((\s*{\s*}?)|(\s*;?))\s*\\?$', rest): 1463 1463 error(line_number, 'whitespace/parens', 4, 1464 1464 'More than one command on the same line in %s' % statement) -
trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r71989 r73248 3153 3153 ' if (condition) doIt();\n', 3154 3154 'More than one command on the same line in if [whitespace/parens] [4]') 3155 # Ensure that having a # in the line doesn't hide the error. 3156 self.assert_multi_line_lint( 3157 ' x++; char a[] = "#";', 3158 'More than one command on the same line [whitespace/newline] [4]') 3159 # Ignore preprocessor if's. 3160 self.assert_multi_line_lint( 3161 ' #if (condition) || (condition2)\n', 3162 '') 3155 3163 3156 3164 # 2. An else statement should go on the same line as a preceding
Note: See TracChangeset
for help on using the changeset viewer.