Drupal PHP Code Sniffer Coding Standards inside a container.
Dockerfile
linksalpine
, 3.0-alpine
, latest
Dockerfilestretch
, 3.0-stretch
DockerfileThis is a Dockerised Solution for running PHPCS with Drupal Standards.
PHP_CodeSniffer is a set of two PHP scripts; the main phpcs
script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf
script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
The Drupal Coding Standards apply to code within Drupal and its contributed modules. This is maintained by the drupal/coder
composer package (https://packagist.org/packages/drupal/coder).
docker pull willhallonline/drupal-phpcs
docker pull willhallonline/drupal-phpcs:stretch
docker run -it --rm -v $(pwd):/app willhallonline/drupal-phpcs phpcs [YOUR-CODE]
docker run -it --rm -v $(pwd):/app willhallonline/drupal-phpcs:stretch phpcs [YOUR-CODE]
docker run -it --rm -v $(pwd):/app willhallonline/drupal-phpcs phpcbf [YOUR-CODE]
docker run -it --rm -v $(pwd):/app willhallonline/drupal-phpcs:stretch phpcbf [YOUR-CODE]
Connect on LinkedIn. Follow me on Twitter. Grab the RSS Feed