tonychue / docker-wordpress-phpcs

Dockerised Wordpress Coding Standards Codesniffer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported tags and respective Dockerfile links

This is a Dockerised Solution for running PHPCS with WordPress Standards.

What is PHPCS?

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.

What are Wordpress Coding Standards?

The Wordpress Coding Standards apply to code within Wordpress and its contributed plugins.

Docker Commands

Pull

docker pull willhallonline/wordpress-phpcs
docker pull willhallonline/wordpress-phpcs:alpine

Run

PHPCS (PHP CodeSniffer)

docker run -it --rm -v $(pwd):/app willhallonline/wordpress-phpcs phpcs [YOUR-CODE]
docker run -it --rm -v $(pwd):/app willhallonline/wordpress-phpcs:alpine phpcs [YOUR-CODE]

PHPCBF (PHP CodeFixer)

docker run -it --rm -v $(pwd):/app willhallonline/wordpress-phpcs phpcbf [YOUR-CODE]
docker run -it --rm -v $(pwd):/app willhallonline/wordpress-phpcs:alpine phpcbf [YOUR-CODE]

About

Dockerised Wordpress Coding Standards Codesniffer


Languages

Language:Dockerfile 100.0%