This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
gitlab-ci-code-quality-phpstan [2020/12/01 22:28] – created admin | gitlab-ci-code-quality-phpstan [2020/12/02 14:34] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Gitlab Code Quality Widget and PHPStan ====== | ====== Gitlab Code Quality Widget and PHPStan ====== | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | <note tip>Make sure you run it on '' | ||
+ | |||
+ | |||
+ | ===== Install | ||
+ | |||
+ | **PHPStan** | ||
+ | |||
+ | <code bash> | ||
+ | composer require --dev phpstan/ | ||
+ | </ | ||
+ | |||
+ | **Add '' | ||
+ | |||
<code yaml .gitlab-ci.yml> | <code yaml .gitlab-ci.yml> | ||
Line 5: | Line 21: | ||
- test | - test | ||
- | code_quality: | + | php_stan: |
image: composer | image: composer | ||
stage: test | stage: test | ||
script: | script: | ||
- composer install --no-ansi | - composer install --no-ansi | ||
- | # Set output to ' | + | # Set output to ' |
- | - ./ | + | - ./ |
artifacts: | artifacts: | ||
reports: | reports: | ||
- | codequality: | + | |
- | paths: [gl-code-quality-report.json] | + | |
+ | # Optional | ||
+ | paths: [gl-phpstan-report.json] | ||
</ | </ | ||
+ | |||
+ | ===== Command explained ===== | ||
+ | |||
+ | |||
+ | ^ ./ | ||
+ | | Run analyzer | ||
+ | |||
+ |