HookFunctions: Exclude markdown files from trailing whitespace check

This commit is contained in:
Will Bainbridge
2018-10-26 09:31:29 +01:00
parent 43da4fefb2
commit 0ae01264e4
2 changed files with 2 additions and 4 deletions

View File

@ -103,7 +103,6 @@ dictBanner="(\
)*?
\\\\\*---------------------------------------------------------------------------\*/"
#-----------------------------------------------------------------------------
#
@ -399,7 +398,7 @@ checkBanner()
for f in $fileList
do
fFile="${f##*/}"
[[ "$fFile" = *.* ]] && fExt="${fFile##*.}" || fExt=""
[[ "$fFile" = "*.*" ]] && fExt="${fFile##*.}" || fExt=""
# Skip links
if [ -h "$f" ]

View File

@ -98,10 +98,9 @@ fi
#------------------------------------------------------------------------------
# Main code. Do all checks.
#
# Builtin whitespace check to avoid trailing space, including CR-LF endings
bad=$(git diff-index --cached --check $against --) || die "$bad"
bad=$(git diff-index --cached --check $against -- ':(exclude)*.md') || die "$bad"
# Check for illegal code, e.g. <TAB>, etc
checkIllegalCode