Changeset 55656 in webkit
- Timestamp:
- Mar 7, 2010 10:55:55 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r55655 r55656 1 2010-03-07 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 check-webkit-style: false positive for empty loop 6 https://bugs.webkit.org/show_bug.cgi?id=35717 7 8 * Scripts/webkitpy/style/processors/cpp.py: 9 * Scripts/webkitpy/style/processors/cpp_unittest.py: 10 1 11 2010-03-07 Kent Tamura <tkent@chromium.org> 2 12 -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
r55151 r55656 1653 1653 # one line control statement was previous. 1654 1654 previous_line = clean_lines.elided[line_number - 2] 1655 if (previous_line.find('{') > 0 1655 if (previous_line.find('{') > 0 and previous_line.find('}') < 0 1656 1656 and search(r'\b(if|for|foreach|while|else)\b', previous_line)): 1657 1657 error(line_number, 'whitespace/braces', 4, -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
r55151 r55656 3065 3065 ['More than one command on the same line in if [whitespace/parens] [4]', 3066 3066 'One line control clauses should not use braces. [whitespace/braces] [4]']) 3067 self.assert_multi_line_lint( 3068 'void func()\n' 3069 '{\n' 3070 ' while (condition) { }\n' 3071 ' return 0;\n' 3072 '}\n', 3073 '') 3074 self.assert_multi_line_lint( 3075 'void func()\n' 3076 '{\n' 3077 ' for (i = 0; i < 42; i++) { foobar(); }\n' 3078 ' return 0;\n' 3079 '}\n', 3080 'More than one command on the same line in for [whitespace/parens] [4]') 3067 3081 3068 3082 # 3. An else if statement should be written as an if statement
Note: See TracChangeset
for help on using the changeset viewer.