mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
install our default dependencies with myrepos and run doc/php_syntax_check.sh to (checks and reports all files, not just first failure)
This commit is contained in:
parent
38f1c2b76b
commit
1eed5073b2
@ -26,9 +26,12 @@ before_script:
|
|||||||
# - mysql -e 'create database egroupware'
|
# - mysql -e 'create database egroupware'
|
||||||
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
||||||
#- composer update --prefer-source $LOWEST_DEPS
|
#- composer update --prefer-source $LOWEST_DEPS
|
||||||
|
- aptitude install myrepos
|
||||||
|
- mr --trust-all --stats up
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- find . -name "*.php" | xargs -n1 php -l
|
#- find . -name "*.php" | xargs -n1 php -l
|
||||||
|
./doc/php_syntax_check.sh
|
||||||
#- ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff
|
#- ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
15
doc/php_syntax_check.sh
Executable file
15
doc/php_syntax_check.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
### Tool to check for PHP Syntax errors
|
||||||
|
### Usage: doc/php_syntax_check [file or directory, defaults to whole egrouware]
|
||||||
|
### Will output all PHP Fatal, Parse erros and also Deprecated incl. filename
|
||||||
|
### Exit-status: 0 on no error, but maybe Deprecated warnings, 1 on error
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
find ${@-.} -name '*.php' -exec php -l {} \; 2>&1 | \
|
||||||
|
#grep -v 'No syntax errors detected in' | \
|
||||||
|
grep '^PHP' | \
|
||||||
|
perl -pe 'END { exit $status } $status=1 if /^PHP (Fatal|Parse error)/;'
|
Loading…
Reference in New Issue
Block a user