HookFunctions: Exclude markdown files from trailing whitespace check
This commit is contained in:
@ -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" ]
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user