summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-06-13 20:49:28 -0700
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-06-22 19:50:54 +0000
commit26abc4b750f2719b1815b6f17338a0869e67b455 (patch)
treea6878e41a3d5015b37f23e54e2fa3915ec3e7f6e
parentd856dc5d249e75d6dac3c9a02373467ead12037d (diff)
Update Apple terminology warnings in sanity bot.
Darwin for desktops is now called macOS. Change-Id: I7dcfc37a14563398fede004951deec5c53cbd7b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-xgit-hooks/sanitize-commit26
1 files changed, 16 insertions, 10 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 40e79f2..efeb2db 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -258,35 +258,41 @@ sub check_apple_terminology()
}
if (/\bQ_OS_MAC\b/) {
- complain_ln("Using deprecated define Q_OS_MAC; use Q_OS_OSX (for OS X only)" .
+ complain_ln("Using deprecated define Q_OS_MAC; use Q_OS_MACOS (for macOS only)" .
" or Q_OS_DARWIN (for all Apple platforms) instead", "terminology");
}
if (/\bQ_OS_MACX\b/) {
- complain_ln("Using deprecated define Q_OS_MACX; use Q_OS_OSX instead", "terminology");
+ complain_ln("Using deprecated define Q_OS_MACX; use Q_OS_MACOS instead", "terminology");
+ }
+
+ if (/\bQ_OS_OSX\b/) {
+ complain_ln("Using deprecated define Q_OS_OSX; use Q_OS_MACOS instead", "terminology");
}
} elsif ($qmake) {
# check qmake scopes
if (s/\bmac\s*:\s*!\s*ios\b/X/) {
- complain_ln("Use of deprecated idiom 'mac:!ios', use 'osx' instead", "terminology");
+ complain_ln("Use of deprecated idiom 'mac:!ios', use 'macos' instead", "terminology");
}
if (s/^([^#]*)\bmac\b( *[|:{])/$1X$2/) {
- complain_ln("Using deprecated qmake scope 'mac': use 'osx' (for OS X only)" .
+ complain_ln("Using deprecated qmake scope 'mac': use 'macos' (for macOS only)" .
" or 'darwin' (for all Apple platforms) instead", "terminology");
}
# Match the word macx but avoid matching macx- and macx* since these are valid for mkspecs
if (/\bmacx\b(?![-*])/) {
- complain_ln("Using deprecated qmake scope 'macx'; use 'osx' instead", "terminology");
+ complain_ln("Using deprecated qmake scope 'macx'; use 'macos' instead", "terminology");
+ }
+
+ if (/\bosx\b) {
+ complain_ln("Using deprecated qmake scope 'osx'; use 'macos' instead", "terminology");
}
}
- # Note that Mac(intosh)? is the name of the hardware that runs the OS X operating system and is
- # valid for use, however users are likely to use Mac(intosh)? to incorrectly refer to the OS so
- # we'll still flag it
- if (/\bmac(([\s_-]*os)([\s_-]*x)?)?\b/i or /\bmacintosh\b/i) {
- complain_ln("Possible incorrect use of Apple-related terminology", "", -1);
+ if (/\bMacOS\b/ or /\bOS[\s]*X\b/ or /\bmac(([\s_-]*os)([\s_-]*x))?\b/i or /\bmacintosh\b/i) {
+ complain_ln("Possible incorrect use of Apple-related terminology; " .
+ "the correct name of Apple's desktop operating system is 'macOS'", "", -1);
}
}