Skip to content
Snippets Groups Projects
Commit 282248cb authored by Fran Garcia-Linares's avatar Fran Garcia-Linares
Browse files

Issue #3440609 by fjgarlin, jonathan1055, DamienMcKenna: Allow custom...

Issue #3440609 by fjgarlin, jonathan1055, DamienMcKenna: Allow custom arguments to be passed to phpcs
parent fa7b6591
No related branches found
No related tags found
1 merge request!185Add new option for phpcs.
Pipeline #147131 passed
# GitLab Templates Changelog
## 1.3.8 - 2024-04-15
#3440609 - Allow custom arguments to be passed to phpcs.\
#3440420 - Allow superuser to call composer on jobs.
## 1.3.7 - 2024-04-12
#3440448 - When requiring drush, do it with the the `-W` param.\
......
......@@ -4,6 +4,6 @@ This job will validate the module's code against Drupal coding standards.
It uses [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/) library and configures the Drupal coding standards.
If the module does not have a default `phpcs.xml` or `phpcs.xml.dist`, it will use [this one](https://git.drupalcode.org/project/gitlab_templates/-/blob/main/assets/phpcs.xml.dist).
If the module does not have a default `phpcs.xml` or `phpcs.xml.dist`, it will use [this one](https://git.drupalcode.org/project/gitlab_templates/-/blob/main/assets/phpcs.xml.dist). If it has one, then it will use it.
If it has one, then it will use it.
You can also use the variable `_PHPCS_EXTRA` in the `variables` section of the `.gitlab-ci.yml` file to pass additional arguments to the call.
......@@ -335,7 +335,7 @@ phpcs:
# Show the installed config file, the paths to the standards and actual coding standards groups being used.
- vendor/bin/phpcs --config-show installed_paths
- vendor/bin/phpcs -i
- vendor/bin/phpcs --basepath=$CI_PROJECT_DIR -s $_WEB_ROOT/sites/all/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
- vendor/bin/phpcs --basepath=$CI_PROJECT_DIR -s $_WEB_ROOT/sites/all/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
allow_failure: true
artifacts:
expose_as: junit
......
......@@ -446,7 +446,7 @@ phpcs:
# Show the installed config file, the paths to the standards and actual coding standards groups being used.
- vendor/bin/phpcs --config-show installed_paths
- vendor/bin/phpcs -i
- vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
- vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
allow_failure: true
artifacts:
expose_as: junit
......
......@@ -92,6 +92,10 @@ variables:
value: ""
description: "Additional options that are appended to the `parallel-lint` job call."
_PHPCS_EXTRA:
value: ""
description: "Additional options that are appended to the `phpcs` job call."
_STYLELINT_EXTRA:
value: ""
description: "Additional options that are appended to the `stylelint` job call."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment