travis_lint_format: skip deleted files
This commit is contained in:
parent
7914958034
commit
ff9626c751
|
@ -12,7 +12,7 @@ echo
|
||||||
|
|
||||||
skipped_directories="(examples|generator|src/tests/(unittests|end2end)|third_party)"
|
skipped_directories="(examples|generator|src/tests/(unittests|end2end)|third_party)"
|
||||||
# Find the files modified that need formatting
|
# 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
|
if [ -z "$files_to_check" ]; then
|
||||||
echo "No modified files to format."
|
echo "No modified files to format."
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue