Skip to content

hussainweb/drupal-code-quality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

drupal-code-quality

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:

Usage

Run these commands in your repository's root directory. The commands below assume that the Drupal site lives under the docroot directory.

Get to a shell

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

Run phpcs with Drupal coder sniffs

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.