https://bugs.webkit.org/show_bug.cgi?id=147146
Reviewed by Darin Adler.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_include_line): Avoid checking previous lines if it it is a lut.h include.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_check_alphabetical_include_order): Added test.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187154
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-07-22 Xabier Rodriguez Calvar <calvaris@igalia.com>
+
+ [check-webkit-style] .lut.h files shouldn't raise a sorting issue
+ https://bugs.webkit.org/show_bug.cgi?id=147146
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_include_line): Avoid checking previous lines if it it is a lut.h include.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (OrderOfIncludesTest.test_check_alphabetical_include_order): Added test.
+
2015-07-21 Filip Pizlo <fpizlo@apple.com>
Fixed VM pool allocation should have a reserve for allocations that cannot fail
# Check to make sure all headers besides config.h and the primary header are
# alphabetically sorted.
- if not error_message and header_type == _OTHER_HEADER:
+ if not error_message and header_type == _OTHER_HEADER and not search(r'\A#include.*\.lut\.h', line):
previous_line_number = line_number - 1
previous_line = clean_lines.lines[previous_line_number]
previous_match = _RE_PATTERN_INCLUDE.search(previous_line)
'#include <assert.h>\n',
'')
+ self.assert_language_rules_check('foo.h',
+ '#include "bar.h"\n'
+ '#include "array.lut.h"\n',
+ '')
+
def test_check_alphabetical_include_order_errors_reported_for_both_lines(self):
# If one of the two lines of out of order headers are filtered, the error should be
# reported on the other line.