travis_lint_format: skip deleted files

This commit is contained in:
Corentin Wallez 2018-07-19 14:57:38 +02:00 committed by Corentin Wallez
parent 7914958034
commit ff9626c751
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ echo
skipped_directories="(examples|generator|src/tests/(unittests|end2end)|third_party)"
# Find the files modified that need formatting
files_to_check=$(git diff --name-only $base_commit | grep -E "*.(c|cpp|mm|h)$" | grep -vE "^$skipped_directories/*")
files_to_check=$(git diff --diff-filter=ACMR --name-only $base_commit | grep -E "*.(c|cpp|mm|h)$" | grep -vE "^$skipped_directories/*")
if [ -z "$files_to_check" ]; then
echo "No modified files to format."
exit 0