summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-11-26 13:46:26 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-11-26 12:56:26 +0000
commit5c862e8557c05b8ff6560bd47b982b7841c7fd0c (patch)
treebb84951281cd87dbbf892766d91720a896ff9a31
parent0c9290408c128d29411acb13add50209ea2f4355 (diff)
downloadqtrepotools-5c862e8557c05b8ff6560bd47b982b7841c7fd0c.tar.gz
sanitize-commit: Don't complain about "Contents/MacOS"
Within bundles we still have a "Contents/MacOS" subdirectory despite being "incorrect terminology". Use negative look-behind to ignore "MacOS" if it's preceded by "Contents/". Change-Id: I1b8d975950f8f5f1cf916fc65f8e99642e71108a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rwxr-xr-xgit-hooks/sanitize-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 3d1ac48..9dff742 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -287,7 +287,7 @@ sub check_apple_terminology()
}
}
- if (/\bMacOS\b/ or /\bOS[\s]*X\b/ or /\bmacintosh\b/i) {
+ if (/(?<!\bContents\/)\bMacOS\b/ or /\bOS[\s]*X\b/ 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);
}