diff --git a/bin/tools/pre-commit-hook b/bin/tools/pre-commit-hook index b06ddd50b6bf83fbc5af17ed00f4dfdcb4a186f1..823559624d971eb1ba828141478519bba0e82d45 100755 --- a/bin/tools/pre-commit-hook +++ b/bin/tools/pre-commit-hook @@ -146,13 +146,20 @@ checkIllegalCode() badFiles=$( for f in $fileList do - # parse line numbers from grep output: - # <lineNr>: contents - lines=$(git grep -E -hn -e "$reBad" $scope"$f" | - sed -e 's@:.*@@' | - tr '\n' ' ' - ) - [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" + case "$f" in + # exclude potential makefiles + (wmake/[Mm]akefile* | wmake/rules/*) + ;; + (*) + # parse line numbers from grep output: + # <lineNr>: contents + lines=$(git grep -E -hn -e "$reBad" $scope"$f" | + sed -e 's@:.*@@' | + tr '\n' ' ' + ) + [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" + ;; + esac done ) diff --git a/bin/tools/pre-receive-hook b/bin/tools/pre-receive-hook index f289b99be702a3b94179713f069751ed09a2bd27..046a80867160a30e7c14bb6c8639d81b6648aa9a 100755 --- a/bin/tools/pre-receive-hook +++ b/bin/tools/pre-receive-hook @@ -109,13 +109,20 @@ checkIllegalCode() badFiles=$( for f in $fileList do - # parse line numbers from grep output: - # <lineNr>: contents - lines=$(git grep -E -hn -e "$reBad" $scope"$f" | - sed -e 's@:.*@@' | - tr '\n' ' ' - ) - [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" + case "$f" in + # exclude potential makefiles + (wmake/[Mm]akefile* | wmake/rules/*) + ;; + (*) + # parse line numbers from grep output: + # <lineNr>: contents + lines=$(git grep -E -hn -e "$reBad" $scope"$f" | + sed -e 's@:.*@@' | + tr '\n' ' ' + ) + [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" + ;; + esac done )