Drupal Code Quality is a Docker image designed to aid in static analysis for Drupal code bases. It is based off Adam Culp's PHP Code Quality Docker image. Therefore, all tools present in adamculp/php-code-quality are also present here. See README.md in that package for more details.
From a Drupal perspective, this Docker image adds:
Run these commands in your repository's root directory. The commands below assume that the Drupal site lives under the docroot
directory.
This is the simplest command to get into a shell with your code mounted under /app
.
docker run -it --rm -v "$PWD":/app -w /app hussainweb/drupal-code-quality:latest bash
docker run -it --rm -v "$PWD":/app -w /app hussainweb/drupal-code-quality:latest phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme docroot/modules/custom/ docroot/themes/custom/
Refer to adamculp/php-code-quality's Usage for more details.