Skip to content

Commit

Permalink
indentation test: handle removed files
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 7, 2015
1 parent 584771e commit c4ae8cd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/verify-indentation.sh
Expand Up @@ -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
;;

Expand All @@ -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
Expand Down

0 comments on commit c4ae8cd

Please sign in to comment.