Skip to content
Permalink
Browse files

Add other PHP lintings as well

  • Loading branch information...
jissereitsma committed Dec 28, 2018
1 parent 3bc0a62 commit fa2a9e3b6be3af801698309f06559c099cb57585
Showing with 13 additions and 2 deletions.
  1. +13 −2 .gitlab-ci.yml
@@ -1,13 +1,24 @@
php-7.0-linting:
image: php:7.0
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'

php-7.1-linting:
image: php:7.1
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'

php-7.1-phpcs:
image: php:7.1
php-7.2-linting:
image: php:7.2
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'

php-7.2-phpcs:
image: php:7.2
script:
- curl -sOL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && mv phpcs.phar /usr/local/bin/phpcs && chmod 755 /usr/local/bin/phpcs
- phpcs --colors --standard=PSR2 --report=full .
- curl -sOL https://getcomposer.org/download/1.8.0/composer.phar && mv composer.phar /usr/local/bin/composer && chmod 755 /usr/local/bin/composer
- composer validate
allow_failure: true

0 comments on commit fa2a9e3

Please sign in to comment.
You can’t perform that action at this time.