Skip to content
Permalink
Browse files

indentation test: handle removed files

  • Loading branch information
jef-n committed Dec 7, 2015
1 parent 584771e commit c4ae8cdcd4a0f1ae75a911c5401319c5a0415409
Showing with 8 additions and 3 deletions.
  1. +8 −3 scripts/verify-indentation.sh
@@ -28,10 +28,15 @@ git diff --name-only $TRAVIS_COMMIT_RANGE >>/tmp/ctest-important.log 2>&1

git diff --name-only $TRAVIS_COMMIT_RANGE | while read f
do
if ! [ -f "$f" ]; then
echo "$f was removed." >>/tmp/ctest-important.log
continue
fi

echo "Checking $f" >>/tmp/ctest-important.log
case "$f" in
src/core/gps/qextserialport/*|src/plugins/dxf2shp_converter/dxflib/src/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*)
echo $f skipped
echo "$f skipped"
continue
;;

@@ -43,11 +48,11 @@ do
;;
esac

m=$f.prepare
m="$f.prepare"
cp "$f" "$m"
astyle.sh "$f"
if diff -u "$m" "$f" >>$ASTYLEDIFF; then
rm $m
rm "$m"
else
echo "File $f needs indentation"
fi

0 comments on commit c4ae8cd

Please sign in to comment.
You can’t perform that action at this time.