This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gitlab-ci-code-quality-phpstan [2020/12/01 22:46] – 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 '' | <note tip>Make sure you run it on '' | ||
- | ===== Install | + | ===== Install |
+ | |||
+ | **PHPStan** | ||
<code bash> | <code bash> | ||
Line 10: | Line 14: | ||
</ | </ | ||
- | ===== Command explained ===== | + | **Add '' |
- | |||
- | ^ ./ | ||
- | | Run analyzer | ||
- | |||
- | |||
- | ===== Exampl CI File ===== | ||
<code yaml .gitlab-ci.yml> | <code yaml .gitlab-ci.yml> | ||
Line 23: | 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: | ||
# Tell Gitlab about the custom generated reports JSON file | # Tell Gitlab about the custom generated reports JSON file | ||
- | codequality: | + | codequality: |
- | paths: [gl-code-quality-report.json] | + | # Optional |
+ | paths: [gl-phpstan-report.json] | ||
</ | </ | ||
+ | |||
+ | ===== Command explained ===== | ||
+ | |||
+ | |||
+ | ^ ./ | ||
+ | | Run analyzer | ||
+ | |||
+ |