mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 10:46:49 +00:00
ci: check syntax via php first
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
phpmd:
|
phpmd:
|
||||||
image: php:5.6
|
image: php:5.6
|
||||||
script:
|
script:
|
||||||
|
- sh utils/php-lint.sh
|
||||||
- curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar
|
- curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar
|
||||||
- chmod +x /usr/bin/phpmd
|
- chmod +x /usr/bin/phpmd
|
||||||
- sh utils/gitlab-ci/phpmd.sh
|
- sh utils/gitlab-ci/phpmd.sh
|
||||||
|
|||||||
3
utils/gitlab-ci/php-lint.sh
Normal file
3
utils/gitlab-ci/php-lint.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
exec find . -name "*.php" -not -path "*/lib/*" -print0 | xargs -0 -n1 php -l
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -i -e
|
||||||
|
|
||||||
#phpmd include text utils/gitlab-ci/phpmd-ruleset.xml
|
#phpmd include text utils/gitlab-ci/phpmd-ruleset.xml
|
||||||
#phpmd classes 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")
|
FILES=$(ls -dm *.php | tr -d " "| tr -d "\n")
|
||||||
phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml
|
phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user