diff options
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 10 |
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 (/^ /) { |