Changeset 245870 in webkit
- Timestamp:
- May 29, 2019, 3:04:58 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/style/checkers/cpp.py (modified) (1 diff)
-
Scripts/webkitpy/style/checkers/cpp_unittest.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r245868 r245870 1 2019-05-29 David Kilzer <ddkilzer@apple.com> 2 3 check-webkit-style reports false-positive build/include_order warning in WTF C++ source files 4 <https://webkit.org/b/198349> 5 6 Reviewed by Alex Christensen. 7 8 * Scripts/webkitpy/style/checkers/cpp.py: 9 (_classify_include): Don't return early for <wtf/Header.h> 10 includes. 11 * Scripts/webkitpy/style/checkers/cpp_unittest.py: 12 (OrderOfIncludesTest.test_primary_header): Add tests for 13 <wtf/Header.h> includes. 14 1 15 2019-05-29 Geoffrey Garen <ggaren@apple.com> 2 16 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r244688 r245870 3032 3032 3033 3033 # If it is a system header we know it is classified as _OTHER_HEADER. 3034 if is_system and not include.startswith('public/') :3034 if is_system and not include.startswith('public/') and not include.startswith('wtf/'): 3035 3035 return _OTHER_HEADER 3036 3036 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r244688 r245870 3130 3130 '#include "bar.h"\n', 3131 3131 '') 3132 3132 3133 # Pretend that header files exist. 3133 3134 os.path.isfile = lambda filename: True 3135 3134 3136 # Missing include for existing primary header -> error. 3135 3137 self.assert_language_rules_check('foo.cpp', … … 3140 3142 'Should be: config.h, primary header, blank line, and then ' 3141 3143 'alphabetically sorted. [build/include_order] [4]') 3144 3142 3145 # *SoftLink.cpp files should not include their headers -> no error. 3143 3146 self.assert_language_rules_check('FooSoftLink.cpp', … … 3146 3149 '#include <wtf/SoftLinking.h>\n', 3147 3150 '') 3151 3148 3152 # Having include for existing primary header -> no error. 3149 3153 self.assert_language_rules_check('foo.cpp', … … 3153 3157 '#include "bar.h"\n', 3154 3158 '') 3159 3160 # Having include for existing WTF primary header -> no error. 3161 self.assert_language_rules_check('foo.cpp', 3162 '#include "config.h"\n' 3163 '#include <wtf/foo.h>\n' 3164 '\n' 3165 '#include <wtf/bar.h>\n', 3166 '') 3167 3168 # WTF primary header included out of order -> error. 3169 self.assert_language_rules_check('foo.cpp', 3170 '#include "config.h"\n' 3171 '#include <wtf/bar.h>\n' 3172 '\n' 3173 '#include <wtf/foo.h>\n', 3174 ['Found other header before a header this file implements. ' 3175 'Should be: config.h, primary header, blank line, and then ' 3176 'alphabetically sorted. [build/include_order] [4]', 3177 'Found header this file implements after other header. ' 3178 'Should be: config.h, primary header, blank line, and then ' 3179 'alphabetically sorted. [build/include_order] [4]']) 3155 3180 3156 3181 os.path.isfile = self.os_path_isfile_orig
Note:
See TracChangeset
for help on using the changeset viewer.