@ -37,7 +37,7 @@ fi
subDir="$(dirname -- "$0")"
# Get all files staged for commit
files="$(git --no-pager diff --cached --name-only)"
files="$(git --no-pager diff --cached --name-only --diff-filter=d)"
failures=0
@ -31,7 +31,7 @@ else
Either skip this script, or install clang-format-11."
fi
files="${1:-$(git --no-pager diff --cached --name-only)}"
files="${1:-$(git --no-pager diff --cached --name-only --diff-filter=d)}"
files="$(echo "$files" | grep -E '\.(cpp|h)$')"
if [ -z "$files" ]; then
@ -23,7 +23,7 @@ if ! command -v shellcheck > /dev/null 2>&1; then
Either skip this script, or install shellcheck."
files="$(echo "$files" | grep -E '\.sh$')"