diff --git a/bin/tools/pre-commit-hook b/bin/tools/pre-commit-hook index 44518f0837..94018f90b7 100755 --- a/bin/tools/pre-commit-hook +++ b/bin/tools/pre-commit-hook @@ -39,7 +39,6 @@ # # Checks for # - illegal code, e.g. -# - copyright is current, e.g. if present, contains XXX- # - columns greater than 80 for *.[CH] files # # Note @@ -138,8 +137,8 @@ checkIllegalCode() { echo "$hookName: check bad strings/characters etc ..." 1>&2 - reBad="(N""abla|"$'\t'")" - msgBad="N""abla or " + reBad="("$'\t'")" + msgBad="" scope=$(gitScope $@) @@ -167,40 +166,6 @@ checkIllegalCode() } -# -# check that OpenCFD copyright is current -# -checkCopyright() -{ - year=$(date +%Y) - echo "$hookName: check copyright ..." 1>&2 - - scope=$(gitScope $@) - - badFiles=$( - for f in $fileList - do - # NB: need to have OpenCFD on a separate line to prevent - # this check being caught by itself! - # - # parse line numbers from grep output: - # : contents - # - lines=$(git grep -F -hn -e Copyright \ - --and -e OpenCFD \ - --and --not -e "$year" \ - $scope"$f" | - sed -e 's@:.*@@' | - tr '\n' ' ' - ) - [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" - done - ) - - dieOnBadFiles "Update copyright year, e.g. XXXX-$year" -} - - # # limit line length to 80-columns # @@ -308,9 +273,6 @@ bad=$(git diff-index --cached --check $against --) || die "$bad" # check for illegal code, e.g. , etc checkIllegalCode -# ensure OpenCFD copyright contains correct year -checkCopyright - # ensure code conforms to 80 columns max checkLineLengthNonDirective diff --git a/bin/tools/pre-receive-hook b/bin/tools/pre-receive-hook index 641185cf13..efae65d5f1 100755 --- a/bin/tools/pre-receive-hook +++ b/bin/tools/pre-receive-hook @@ -39,7 +39,6 @@ # # Checks for # - illegal code, e.g. -# - copyright is current, e.g. if present, contains XXX- # - columns greater than 80 for *.[CH] files # #------------------------------------------------------------------------------ @@ -101,8 +100,8 @@ checkIllegalCode() { echo "$hookName: check bad strings/characters etc ..." 1>&2 - reBad="(N""abla|"$'\t'"|"$'\r\n'")" - msgBad="N""abla, or DOS-line-endings" + reBad="("$'\t'"|"$'\r\n'")" + msgBad=" or DOS-line-endings" scope=$(gitScope $@) @@ -130,40 +129,6 @@ checkIllegalCode() } -# -# check that OpenCFD copyright is current -# -checkCopyright() -{ - year=$(date +%Y) - echo "$hookName: check copyright ..." 1>&2 - - scope=$(gitScope $@) - - badFiles=$( - for f in $fileList - do - # NB: need to have OpenCFD on a separate line to prevent - # this check being caught by itself! - # - # parse line numbers from grep output: - # : contents - # - lines=$(git grep -F -hn -e Copyright \ - --and -e OpenCFD \ - --and --not -e "$year" \ - $scope"$f" | - sed -e 's@:.*@@' | - tr '\n' ' ' - ) - [ -n "$lines" ] && echo "$Indent$f -- lines: $lines" - done - ) - - dieOnBadFiles "Update copyright year, e.g. XXXX-$year" -} - - # # limit line length to 80-columns # @@ -297,9 +262,6 @@ do # check for illegal code, e.g. , etc checkIllegalCode $newSHA1 - # ensure OpenCFD copyright contains correct year - checkCopyright $newSHA1 - # ensure code conforms to 80 columns max checkLineLengthNonDirective $newSHA1