Browse Source

Meta: Dont try to lint files that are being deleted

master
Riyyi 2 years ago
parent
commit
29406fac1f
  1. 2
      script/lint-ci.sh
  2. 2
      script/lint-clang-format.sh
  3. 2
      script/lint-shell-script.sh

2
script/lint-ci.sh

@ -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

2
script/lint-clang-format.sh

@ -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

2
script/lint-shell-script.sh

@ -23,7 +23,7 @@ if ! command -v shellcheck > /dev/null 2>&1; then
Either skip this script, or install shellcheck."
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 '\.sh$')"
if [ -z "$files" ]; then

Loading…
Cancel
Save