Skip to content

Commit

Permalink
Make travis use php lint in all files
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Aug 20, 2015
1 parent 0c82d43 commit cc12253
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/bin/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@

if [ $1 == 'before' ]; then

# Lint files
for file in $(find . -name "*.php" -and -not -path "./tmp/*" -and -not -path "./tests/*" -and -not -path "./apigen/*"); do
output=$( php -l $file )
if [[ $output == *"Errors parsing"* ]]; then
echo "Build stopped because of a syntax error: $output";
exit 1;
fi
done

# composer install fails in PHP 5.2
[ $TRAVIS_PHP_VERSION == '5.2' ] && exit;

Expand Down

0 comments on commit cc12253

Please sign in to comment.