Changeset 161535 in webkit
- Timestamp:
- Jan 8, 2014 6:13:07 PM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r161524 r161535 1 2014-01-08 Gergo Balogh <geryxyz@inf.u-szeged.hu> 2 3 Missleading style error when mixing system and non-system header include lines. 4 https://bugs.webkit.org/show_bug.cgi?id=126564 5 6 Reviewed by Ryosuke Niwa. 7 8 * Scripts/webkitpy/style/checkers/cpp.py: 9 (check_include_line): 10 * Scripts/webkitpy/style/checkers/cpp_unittest.py: 11 (OrderOfIncludesTest.test_check_alphabetical_include_order): 12 (OrderOfIncludesTest.test_public_primary_header): 13 1 14 2014-01-08 Seokju Kwon <seokju@webkit.org> 2 15 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r161510 r161535 2917 2917 if previous_match: 2918 2918 previous_header_type = include_state.header_types[previous_line_number] 2919 if previous_header_type == _OTHER_HEADER and previous_line.strip() > line.strip(): 2920 # This type of error is potentially a problem with this line or the previous one, 2921 # so if the error is filtered for one line, report it for the next. This is so that 2922 # we properly handle patches, for which only modified lines produce errors. 2923 if not error(line_number - 1, 'build/include_order', 4, 'Alphabetical sorting problem.'): 2924 error(line_number, 'build/include_order', 4, 'Alphabetical sorting problem.') 2919 if previous_header_type == _OTHER_HEADER: 2920 if '<' in previous_line and '"' in line: 2921 error(line_number, 'build/include_order', 4, 'Bad include order. Mixing system and custom headers.') 2922 elif previous_line.strip() > line.strip(): 2923 # This type of error is potentially a problem with this line or the previous one, 2924 # so if the error is filtered for one line, report it for the next. This is so that 2925 # we properly handle patches, for which only modified lines produce errors. 2926 if not error(line_number - 1, 'build/include_order', 4, 'Alphabetical sorting problem.'): 2927 error(line_number, 'build/include_order', 4, 'Alphabetical sorting problem.') 2925 2928 2926 2929 if error_message: -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r161510 r161535 2624 2624 '#include <assert.h>\n' 2625 2625 '#include "bar.h"\n', 2626 ' Alphabetical sorting problem. [build/include_order] [4]')2626 'Bad include order. Mixing system and custom headers. [build/include_order] [4]') 2627 2627 2628 2628 self.assert_language_rules_check('foo.h', … … 2776 2776 '\n' 2777 2777 '#include "a.h"\n', 2778 ' Alphabetical sorting problem. [build/include_order] [4]')2778 'Bad include order. Mixing system and custom headers. [build/include_order] [4]') 2779 2779 2780 2780 # ...except that it starts with public/. … … 2792 2792 '\n' 2793 2793 '#include "a.h"\n', 2794 ' Alphabetical sorting problem. [build/include_order] [4]')2794 'Bad include order. Mixing system and custom headers. [build/include_order] [4]') 2795 2795 2796 2796 def test_check_wtf_includes(self):
Note: See TracChangeset
for help on using the changeset viewer.