master
branch first. If no artifact exists on master Gitlab can't compare code quality
PHP CS Fixer
composer require friendsofphp/php-cs-fixer --dev
Add .gitlab-ci.yml
:
stages: - test php-cs-fixer: image: composer stage: test script: - composer install - ./vendor/bin/php-cs-fixer fix -v --dry-run --format gitlab --using-cache false > gl-php-cs-fixer-report.json || exit 0 artifacts: reports: codequality: gl-php-cs-fixer-report.json # Optional paths: [gl-php-cs-fixer-report.json]
./vendor/bin/php-cs-fixer fix -v –dry-run | –format gitlab | –using-cache false | > gl-php-cs-fixer-report.json | exit 0 |
---|---|---|---|---|
Run analyzer, but do not fix code style | Output Gitlab readable JSON format | Disable cache | Write output to file | Optional: Make sure job always passes |