ci: check syntax via php first

This commit is contained in:
Andrew Dolgov 2017-04-26 16:26:53 +03:00
parent 897804cef2
commit 3923815580
3 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
phpmd:
image: php:5.6
script:
- sh utils/php-lint.sh
- curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar
- chmod +x /usr/bin/phpmd
- sh utils/gitlab-ci/phpmd.sh

View File

@ -0,0 +1,3 @@
#!/bin/sh -e
exec find . -name "*.php" -not -path "*/lib/*" -print0 | xargs -0 -n1 php -l

View File

@ -1,7 +1,8 @@
#!/bin/sh -e
#!/bin/sh -i -e
#phpmd include text utils/gitlab-ci/phpmd-ruleset.xml
#phpmd classes text utils/gitlab-ci/phpmd-ruleset.xml
FILES=$(ls -dm *.php | tr -d " "| tr -d "\n")
phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml