Run phpstan in Travis
This commit is contained in:
parent
5dca09c0cb
commit
100d5846d1
2 changed files with 22 additions and 2 deletions
18
.travis.yml
18
.travis.yml
|
@ -11,10 +11,23 @@ matrix:
|
|||
fast_finish: true
|
||||
|
||||
env:
|
||||
global:
|
||||
- RUN_PHPSTAN="FALSE"
|
||||
matrix:
|
||||
- PREFER_LOWEST=""
|
||||
- PREFER_LOWEST="--prefer-lowest"
|
||||
|
||||
install:
|
||||
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: 'PHPStan'
|
||||
php: 7.4
|
||||
env:
|
||||
- RUN_PHPSTAN="TRUE"
|
||||
fast_finish: true
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
|
@ -27,8 +40,9 @@ before_script:
|
|||
- composer update $PREFER_LOWEST
|
||||
|
||||
script:
|
||||
- find Core -name "*.php" | xargs -n1 php -l
|
||||
- ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff
|
||||
- if [ $RUN_PHPSTAN == "FALSE" ]; then find Core -name "*.php" | xargs -n1 php -l; fi
|
||||
- if [ $RUN_PHPSTAN == "FALSE" ]; then ./vendor/bin/sabre-cs-fixer fix . --dry-run --diff; fi
|
||||
- if [ $RUN_PHPSTAN == "TRUE" ]; then php vendor/bin/phpstan.phar analyse Core html; fi
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
6
phpstan.neon
Normal file
6
phpstan.neon
Normal file
|
@ -0,0 +1,6 @@
|
|||
parameters:
|
||||
level: 0
|
||||
excludes_analyse:
|
||||
- Core/Frameworks/BaikalAdmin/Resources/GlyphiconsPro/generate-sprite.php
|
||||
- Core/Resources/Web/BaikalAdmin/GlyphiconsPro/generate-sprite.php
|
||||
- html/res/core/BaikalAdmin/GlyphiconsPro/generate-sprite.php
|
Loading…
Reference in a new issue