Modified: trunk/Tools/ChangeLog (239788 => 239789)
--- trunk/Tools/ChangeLog 2019-01-09 23:03:23 UTC (rev 239788)
+++ trunk/Tools/ChangeLog 2019-01-09 23:30:16 UTC (rev 239789)
@@ -1,3 +1,15 @@
+2019-01-09 Alexey Proskuryakov <a...@apple.com>
+
+ Tweak wording for build/version_check style checker error
+ https://bugs.webkit.org/show_bug.cgi?id=193256
+
+ Reviewed by Tim Horton.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_os_version_checks):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (WebKitStyleTest.test_os_version_checks):
+
2019-01-09 Aakash Jain <aakash_j...@apple.com>
[ews-build] Add link to bug along with bug title
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (239788 => 239789)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-01-09 23:03:23 UTC (rev 239788)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-01-09 23:30:16 UTC (rev 239789)
@@ -1128,7 +1128,7 @@
return
if _RE_PATTERN_XCODE_VERSION_MACRO.match(line):
- error(line_number, 'build/version_check', 5, 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h.')
+ error(line_number, 'build/version_check', 5, 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file.')
class _ClassInfo(object):
"""Stores information about a class."""
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (239788 => 239789)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-01-09 23:03:23 UTC (rev 239788)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-01-09 23:30:16 UTC (rev 239789)
@@ -5573,14 +5573,14 @@
self.assert_lint('WK_API_AVAILABLE(macosx(1.2.3), ios(WK_MAC_TBA))', 'WK_MAC_TBA is neither a version number nor WK_IOS_TBA [build/wk_api_available] [5]')
def test_os_version_checks(self):
- self.assert_lint('#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h. [build/version_check] [5]')
- self.assert_lint('#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h. [build/version_check] [5]')
+ self.assert_lint('#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5]')
+ self.assert_lint('#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5]')
self.assert_lint('#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300', '', 'Source/WTF/wtf/Platform.h')
self.assert_lint('#if PLATFORM(MAC) && __IPHONE_OS_VERSION_MIN_REQUIRED > 120000', '', 'Source/WTF/wtf/Platform.h')
self.assert_lint('#if PLATFORM(MAC) && __IPHONE_OS_VERSION_MIN_REQUIRED > 120400', 'Incorrect OS version check. VERSION_MIN_REQUIRED values never include a minor version. You may be looking for a combination of VERSION_MIN_REQUIRED for target OS version check and VERSION_MAX_ALLOWED for SDK check. [build/version_check] [5]', 'Source/WTF/wtf/Platform.h')
- self.assert_lint('#if !TARGET_OS_SIMULATOR && __WATCH_OS_VERSION_MIN_REQUIRED < 50000', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h. [build/version_check] [5]')
- self.assert_lint('#if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101304)', ['Incorrect OS version check. VERSION_MIN_REQUIRED values never include a minor version. You may be looking for a combination of VERSION_MIN_REQUIRED for target OS version check and VERSION_MAX_ALLOWED for SDK check. [build/version_check] [5]', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h. [build/version_check] [5]'])
- self.assert_lint('#define FOO ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300))', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h or wtf/FeatureDefines.h. [build/version_check] [5]')
+ self.assert_lint('#if !TARGET_OS_SIMULATOR && __WATCH_OS_VERSION_MIN_REQUIRED < 50000', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5]')
+ self.assert_lint('#if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101304)', ['Incorrect OS version check. VERSION_MIN_REQUIRED values never include a minor version. You may be looking for a combination of VERSION_MIN_REQUIRED for target OS version check and VERSION_MAX_ALLOWED for SDK check. [build/version_check] [5]', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5]'])
+ self.assert_lint('#define FOO ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300))', 'Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5]')
def test_other(self):
# FIXME: Implement this.