Skip to content
Snippets Groups Projects
Commit 3102dc08 authored by Ines WALLON's avatar Ines WALLON
Browse files

Issue #3516500 by jonhattan, liber_t: .toolbox/ does not exist in phpmd and phpstan

parent 6aca4c01
No related branches found
No related tags found
No related merge requests found
Pipeline #468811 passed
...@@ -35,5 +35,5 @@ workflow: ...@@ -35,5 +35,5 @@ workflow:
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
# Execute jobs when a new tag is created. # Execute jobs when a new tag is created.
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
# Execute jobs when a new commit is pushed to 1.0.x branch. # Execute jobs when a new commit is pushed to develop branch.
- if: $CI_COMMIT_BRANCH == '1.0.x' - if: $CI_COMMIT_BRANCH == 'develop'
...@@ -5,17 +5,17 @@ stages: ...@@ -5,17 +5,17 @@ stages:
include: include:
# Mandatory file # Mandatory file
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/global/base.global.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/global/base.global.yml
# Security # Security
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/security/composer_check/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/security/composer_check/template.yml
# code_quality # code_quality
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/composer_normalize/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/composer_normalize/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/composer_validate/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/composer_validate/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/php_cs_fixer/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/php_cs_fixer/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/phpcs/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/phpcs/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/phpmd/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/phpmd/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/phpstan/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/phpstan/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/ShellCheck/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/ShellCheck/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/css_lint/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/css_lint/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/js_lint/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/js_lint/template.yml
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/code_quality/yaml_lint/template.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/code_quality/yaml_lint/template.yml
...@@ -7,6 +7,10 @@ parameters: ...@@ -7,6 +7,10 @@ parameters:
# Ignore some type hint errors due to hooks that should not have typed hint # Ignore some type hint errors due to hooks that should not have typed hint
# parameters or return. # parameters or return.
ignoreErrors: ignoreErrors:
- identifier: missingType.generics
- identifier: missingType.iterableValue
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"
- -
message: '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no typehint specified\.#' message: '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no typehint specified\.#'
paths: paths:
......
...@@ -7,6 +7,9 @@ variables: ...@@ -7,6 +7,9 @@ variables:
- .cache - .cache
- .code_quality_default - .code_quality_default
before_script: before_script:
- mkdir -p .toolbox/
- ${COMPOSER_BIN} init --working-dir=.toolbox/ --name=drupal/gitlab-toolbox -n
- ${COMPOSER_BIN} config --working-dir=.toolbox/ --no-plugins allow-plugins.phpstan/extension-installer true
- ${COMPOSER_BIN} require --working-dir=.toolbox/ --no-interaction --ignore-platform-reqs --no-progress mglaman/phpstan-drupal - ${COMPOSER_BIN} require --working-dir=.toolbox/ --no-interaction --ignore-platform-reqs --no-progress mglaman/phpstan-drupal
- test -f phpstan.neon.dist || curl -OL --create-dirs --output-dir .toolbox/ ${TOOLBOX_REF_URL}/templates/code_quality/phpstan/phpstan.neon.dist - test -f phpstan.neon.dist || curl -OL --create-dirs --output-dir .toolbox/ ${TOOLBOX_REF_URL}/templates/code_quality/phpstan/phpstan.neon.dist
script: script:
......
include: include:
- remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/1.0.x/templates/global/variables.global.yml - remote: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/develop/templates/global/variables.global.yml
variables: variables:
SKIP_SECURITY: 0 SKIP_SECURITY: 0
......
variables: variables:
DOCKER_CI_PHP_IMAGE: "florenttorregrosa/ci-php:8.3-cli-alpine-node18" DOCKER_CI_PHP_IMAGE: "florenttorregrosa/ci-php:8.3-cli-alpine-node18"
DOCKER_CI_NODE_IMAGE: "florenttorregrosa/ci-php:8.3-cli-alpine-node18" DOCKER_CI_NODE_IMAGE: "florenttorregrosa/ci-php:8.3-cli-alpine-node18"
TOOLBOX_VERSION: "1.0.x" TOOLBOX_VERSION: "develop"
#TOOLBOX_REF_URL: https://git.drupalcode.org/project/gitlab_toolbox/-/raw/${TOOLBOX_VERSION} #TOOLBOX_REF_URL: https://git.drupalcode.org/project/gitlab_toolbox/-/raw/${TOOLBOX_VERSION}
TOOLBOX_REF_URL: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/${TOOLBOX_VERSION} TOOLBOX_REF_URL: https://gitlab.com/ines.wallon/drupal-gitlab-toolbox/-/raw/${TOOLBOX_VERSION}
BIN_DIR: "vendor/bin" BIN_DIR: "vendor/bin"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment