What is this?
A Docker image that utilizes a phpcs to evaluate coding standards on code.
Based on:
How to use this image
Basic usage.
docker run --rm \
--volume /local/path:/project \
udovicic/magentost[:tag] [<options>]
For example, to check src
directory against the lMEQP2 coding standard.
docker run --rm \
--volume `pwd`:/project \
udovicic/magentost:latest --standard=mcga --extensions=js,php,phtml src
A personal recommendation is to add following to your set of aliases:
alias mcga='docker run --rm --volume `pwd`:/project udovicic/magentost:latest --standard=mcga --extensions=js,php,phtml'
alias mcga-fix='docker run --rm --entrypoint "phpcbf" --volume `pwd`:/project udovicic/magentost:latest --standard=mcga --extensions=js,php,phtml'
In that case, you can simply use this as:
$ mcga <path_to_source>
And to fix what can be automaticall done:
$ mcga-fix <path_to_source>
Volumes
/project
: Your PHP project directory.