User Tools

Site Tools


gitlab-ci-code-quality-phpstan

This is an old revision of the document!


Gitlab Code Quality Widget and PHPStan

.gitlab-ci.yml
stages:
  - test

code_quality:
  image: composer
  stage: test
  script:
    - composer install --no-ansi
    # Set output to 'gitlab' using '--error-format=gitlab', 'exit 0' is required and the artifact gets uploaded
    - ./vendor/bin/phpstan analyse --error-format=gitlab --no-progress Classes/ > gl-code-quality-report.json || exit 0
  artifacts:
    reports:
      codequality: gl-code-quality-report.json
    paths: [gl-code-quality-report.json]
gitlab-ci-code-quality-phpstan.1606861691.txt.gz · Last modified: 2020/12/01 22:28 by admin