Closed RoySegall closed 8 years ago
We can also have a local run_coder.sh
script that will do something like:
phpcs --standard=Drupal -p --colors --extensions=php,module,inc,install,test,profile,theme,js,css,info $ROOT
if [ $? -ne 0 ]; then
# If there was an error try to fix it, and re-run PHPCS.
echo
echo "$Autofixing errors, and re-running PHPCS"
echo
phpcbf --standard=Drupal -p --colors --extensions=php,module,inc,install,test,profile,theme,js,css,info $ROOT
phpcs --standard=Drupal -p --colors --extensions=php,module,inc,install,test,profile,theme,js,css,info $ROOT
fi
or maybe it doesn't make sense that each contrib module will add their own script. Anyway, for now lets go with the travis one.
do you want this as a git hook maybe?
Please do, it's great.