WebKit Bugzilla
Attachment 358640 Details for
Bug 193256
: Tweak wording for build/version_check style checker error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
OrInternal.txt (text/plain), 5.71 KB, created by
Alexey Proskuryakov
on 2019-01-08 14:48:31 PST
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Alexey Proskuryakov
Created:
2019-01-08 14:48:31 PST
Size:
5.71 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 239748) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-01-08 Alexey Proskuryakov <ap@apple.com> >+ >+ Tweak wording for build/version_check style checker error >+ https://bugs.webkit.org/show_bug.cgi?id=193256 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/style/checkers/cpp.py: >+ (check_os_version_checks): >+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: >+ (WebKitStyleTest.test_os_version_checks): >+ > 2019-01-08 Zhifei Fang <zhifei_fang@apple.com> > > Layout test will generate a perf metric file to results dir. >Index: Tools/Scripts/webkitpy/style/checkers/cpp.py >=================================================================== >--- Tools/Scripts/webkitpy/style/checkers/cpp.py (revision 239726) >+++ Tools/Scripts/webkitpy/style/checkers/cpp.py (working copy) >@@ -1128,7 +1128,7 @@ def check_os_version_checks(filename, cl > 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.""" >Index: Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >=================================================================== >--- Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (revision 239726) >+++ Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (working copy) >@@ -5573,14 +5573,14 @@ class WebKitStyleTest(CppStyleTestBase): > 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.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193256
: 358640