Skip to content
Snippets Groups Projects
Select Git revision
  • 3b88833605add9208cd28e8fb9125eb41a68c542
  • master default protected
  • devel
  • feature/add-escaping-to-templates
  • feature/add-priority-sorting
  • 3.3.0
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.4.12
  • 2.4.11
  • 2.4.10
  • 2.4.9
  • 2.4.8
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.2
  • 2.3.1
  • 2.3
25 results

form-start.php

Blame
  • static-analysis.yml 1.74 KiB
    .static-analysis:
      image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.4.1
      needs:
        - prepare prefixed vendor
      stage: tests
    
    phpstan:
      extends: .static-analysis
      script:
        - |
          if [ -f "vendor/bin/phpstan" ]; then
            vendor/bin/phpstan analyse --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
            vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml
          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 --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
            vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml
          else
            echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
            exit 125
          fi
      artifacts:
        paths:
          - phpstan-codequality.json
          - phpstan-junit.json
        expire_in: 1 week
        reports:
          codequality: phpstan-codequality.json
          junit: phpstan-junit.xml
      rules:
        - !reference [.skip-mr, rules]
        - if: $CI_PROJECT_NAMESPACE =~ /predators/
          allow_failure: true
        - exists:
          - phpstan.neon.dist
    
    phpcs:
      extends: .static-analysis
      script:
        - vendor/bin/phpcs --warning-severity=0 --report-junit=phpcs-junit.xml --report-full
      rules:
        - !reference [.skip-mr, rules]
        - if: $CI_PROJECT_NAMESPACE =~ /predators/
          allow_failure: true
        - exists:
          - phpcs.xml.dist
      artifacts:
        paths:
          - phpcs-junit.xml
        expire_in: 1 week
        reports:
          junit: phpcs-junit.xml