Changeset 159872 in webkit
- Timestamp:
- Nov 29, 2013 6:32:53 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r159868 r159872 1 2013-11-29 Gergo Balogh <geryxyz@inf.u-szeged.hu> 2 3 check-webkit-style should check for extraneous newline between config.h and primary header. 4 https://bugs.webkit.org/show_bug.cgi?id=124821 5 6 Reviewed by Csaba Osztrogonác. 7 8 * Scripts/webkitpy/style/checkers/cpp.py: 9 (check_include_line): 10 * Scripts/webkitpy/style/checkers/cpp_unittest.py: 11 (OrderOfIncludesTest.test_check_line_break_after_own_header): 12 (OrderOfIncludesTest): 13 (OrderOfIncludesTest.test_check_line_break_before_own_header): 14 1 15 2013-11-29 Jozsef Berta <jberta@inf.u-szeged.hu> 2 16 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r159612 r159872 2819 2819 primary_header_exists) 2820 2820 2821 # Check to make sure we have a blank line after primary header.2821 # Check to make sure we have a blank line after and none before primary header. 2822 2822 if not error_message and header_type == _PRIMARY_HEADER: 2823 next_line = clean_lines.raw_lines[line_number + 1] 2824 if not is_blank_line(next_line): 2823 next_line = clean_lines.raw_lines[line_number + 1] 2824 previous_line = clean_lines.raw_lines[line_number - 1] 2825 if not is_blank_line(next_line): 2825 2826 error(line_number, 'build/include_order', 4, 2826 'You should add a blank line after implementation file\'s own header.') 2827 'You should add a blank line after implementation file\'s own header.') 2828 if is_blank_line(previous_line): 2829 error(line_number, 'build/include_order', 4, 2830 'You should not add a blank line before implementation file\'s own header.') 2827 2831 2828 2832 # Check to make sure all headers besides config.h and the primary header are -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r159612 r159872 2645 2645 '') 2646 2646 2647 def test_check_line_break_before_own_header(self): 2648 self.assert_language_rules_check('foo.cpp', 2649 '#include "config.h"\n' 2650 '\n' 2651 '#include "foo.h"\n' 2652 '\n' 2653 '#include "bar.h"\n', 2654 'You should not add a blank line before implementation file\'s own header. [build/include_order] [4]') 2655 2656 self.assert_language_rules_check('foo.cpp', 2657 '#include "config.h"\n' 2658 '#include "foo.h"\n' 2659 '\n' 2660 '#include "bar.h"\n', 2661 '') 2662 2647 2663 def test_check_preprocessor_in_include_section(self): 2648 2664 self.assert_language_rules_check('foo.cpp',
Note: See TracChangeset
for help on using the changeset viewer.