User Tools

Site Tools


gitlab-ci-code-quality-phpstan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gitlab-ci-code-quality-phpstan [2020/12/01 23:06] admingitlab-ci-code-quality-phpstan [2020/12/02 14:34] (current) admin
Line 21: 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 'gitlab' using '--error-format=gitlab', 'exit 0' is required and the artifact gets uploaded +    # Set output to 'gitlab' using '--error-format=gitlab', the artifact gets uploaded 
-    - ./vendor/bin/phpstan analyse --error-format=gitlab --no-progress Classes/ > gl-code-quality-report.json || exit 0+    - ./vendor/bin/phpstan analyse --error-format=gitlab --no-progress Classes/ > gl-phpstan-report.json || exit 0
   artifacts:   artifacts:
     reports:     reports:
       # Tell Gitlab about the custom generated reports JSON file       # Tell Gitlab about the custom generated reports JSON file
-      codequality: gl-code-quality-report.json +      codequality: gl-phpstan-report.json 
-    paths: [gl-code-quality-report.json] +    # Optional 
 +    paths: [gl-phpstan-report.json]
 </code> </code>
  
Line 40: Line 40:
  
 ^ ./vendor/bin/phpstan analyse ^ --error-format=gitlab              ^ --no-progress           ^ Classes/ ^ > gl-code-quality-report.json ^ exit 0 ^ ^ ./vendor/bin/phpstan analyse ^ --error-format=gitlab              ^ --no-progress           ^ Classes/ ^ > gl-code-quality-report.json ^ exit 0 ^
-| Run analyzer                 | Output Gitlab readable JSON format | Hide progress indicator | Folders to analyze | Write output to file | Make sure job always passes |+| Run analyzer                 | Output Gitlab readable JSON format | Hide progress indicator | Folders to analyze | Write output to file | Optional: Make sure job always passes |
  
  
gitlab-ci-code-quality-phpstan.1606864007.txt.gz · Last modified: 2020/12/01 23:06 by admin