Skip to content
Snippets Groups Projects
Select Git revision
  • 6bd7637862bd57136b748fb0ff0770a03610fe8f
  • master default protected
  • bugfix/wordpress-review
  • bugfix/prevent-error-notice
  • remove-arrow
  • feature/update-message
  • feature/minimum-plugin-version-check-demo1
  • feature/plugin-name
  • 3.7.1
  • 3.7.0
  • 3.6.3
  • 3.6.2
  • 3.6.1
  • 3.6.0
  • 3.6.0-beta3
  • 3.6.0-beta2
  • 3.6.0-beta1
  • 3.5.2
  • 3.5.1
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.8
  • 3.2.7
  • 3.2.6
  • 3.2.5
  • 3.2.4
  • 3.2.3
28 results

Basic_Requirement_Checker.php

Blame
  • static-analysis.yml 1.23 KiB
    .static-analysis: &static-tmpl
      image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.2
      needs:
        - prepare prefixed vendor
      stage: tests
      extends: .skip-mr
    
    # Run phpstan in strict mode (failing pipeline) only if we have baseline, otherwise allow to fail with a warning, suggesting to create one. This behavior will change at the end of the year, when any PHPStan failure will be considered fatal
    phpstan:
      <<: *static-tmpl
      script:
        - |
          if [ -f "vendor/bin/phpstan" ]; then
            vendor/bin/phpstan analyse --memory-limit=2G
          elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then
            # PHPStan installed by director
            vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --memory-limit=2G
          else
            echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
            # We will be able to use custom exit after removing rules.allow_failure part
            # exit 125
          fi
      allow_failure: true
      rules:
        - exists:
          - .phpstan-baseline.php
          - .phpstan-baseline.neon
          allow_failure: false
    
    phpcs:
      <<: *static-tmpl
      script:
        - vendor/bin/phpcs
      allow_failure: true
      rules:
        - exists:
          - phpcs.xml.dist