summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/sanitize-commit10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index e41cbfb..573ab9d 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -822,7 +822,15 @@ while (<DIFF>) {
}
}
check_spelling() if ($spell_check);
- check_apple_terminology() if ($apple_check);
+ if ($apple_check) {
+ check_apple_terminology();
+ if ($file =~ /\.(c|cpp)$/i) {
+ if (/\b__OBJC__\b/) {
+ complain_ln("__OBJC__ will never be defined for non-Objective-C/C++ source files",
+ "objc");
+ }
+ }
+ }
} else {
flushChunk() if ($chunk);
if (/^ /) {