hussainweb / drupalqa

Docker image with quality analysis tools for Drupal
https://hub.docker.com/r/hussainweb/drupalqa
MIT License
21 stars 2 forks source link

Drupal code quality issue while running on CI/CD pipeline #4

Closed surajvantage closed 2 years ago

surajvantage commented 2 years ago

When I raise a PR with the develop branch in GitHub, drupal_code_quality check is facing while running on CI/CD pipeline. Below is a reference for the issue:

Running phpcs --standard=phpcs.xml --extensions=php,module,inc,install,test,profile,theme --ignore=/node_modules/ docroot/modules/custom

  /usr/bin/docker run --workdir /home/runner/work/glt/glt --rm --init --tty -v /var/run/docker.sock:/var/run/docker.sock -v /home/runner/work/glt/glt:/home/runner/work/glt/glt hussainweb/drupalqa:php7.4 phpcs --standard=phpcs.xml --extensions=php,module,inc,install,test,profile,theme --ignore=/node_modules/ docroot/modules/custom

  ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist

  Run "phpcs --help" for usage information

  Error: drupalqa: The process '/usr/bin/docker' failed with exit code 3
hussainweb commented 2 years ago

Thanks, @surajvantage for reporting this. This is due to the new dependency added to the coder module (which contains the Drupal and DrupalPractice sniffs). See https://github.com/pfrenssen/coder/pull/147. The dependency does get included but phpcs doesn't know about the path. We should fix that.