Title: [187154] trunk/Tools
- Revision
- 187154
- Author
- calva...@igalia.com
- Date
- 2015-07-22 01:15:48 -0700 (Wed, 22 Jul 2015)
Log Message
[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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (187153 => 187154)
--- trunk/Tools/ChangeLog 2015-07-22 08:13:17 UTC (rev 187153)
+++ trunk/Tools/ChangeLog 2015-07-22 08:15:48 UTC (rev 187154)
@@ -1,3 +1,15 @@
+2015-07-22 Xabier Rodriguez Calvar <calva...@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 <fpi...@apple.com>
Fixed VM pool allocation should have a reserve for allocations that cannot fail
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (187153 => 187154)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2015-07-22 08:13:17 UTC (rev 187153)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2015-07-22 08:15:48 UTC (rev 187154)
@@ -3024,7 +3024,7 @@
# 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)
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (187153 => 187154)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2015-07-22 08:13:17 UTC (rev 187153)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2015-07-22 08:15:48 UTC (rev 187154)
@@ -2699,6 +2699,11 @@
'#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.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes