wp-enforcer
wp-enforcer copied to clipboard
Git hooks to encourage well-written WordPress.
Some times we have our vendor folder in a bellow level where the .git folder is. With this case we can't call ./vendor/bin/phpcs We could have it in ./web/vendor/bin/phpcs With...
## Problem In version 0.5.0, when I run `wp-enforcer` it removes the standards already set for a project. ## Description I have multiple coding standards installed in my project ([WP...
I'm considering rewriting the main `wp-enforcer` Bash script in PHP. It would still be run the same way, but rather than dealing with a very procedural scripting language we could...
Possibly related to #12, when I have WP Enforcer enabled, I'm prevented from adding images to my Git repo. PHPCS reports multiple errors, most noticeably "mixed line endings" and "ASP...
Would it be possible to modify the hook to check only the code that was added in a given commit (instead of checking changed files as in #1)? I think...
https://github.com/stevegrunwell/wp-enforcer/blob/develop/bin/hooks/pre-commit#L9 This line is hard-coded and does not respect the `-c` flag of the CLI. ```shell # Determine if we have a phpcs.xml file if [[ -f ./phpcs.xml ]]; then...
WordPress has [an official .jshintrc](https://develop.svn.wordpress.org/trunk/.jshintrc) file and [PHP_CodeSniffer can be configured to run it automatically](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#generic-coding-standard-configuration-options), we just need to put those pieces together so JavaScript can automatically be linted/hinted/otherwise checked.
As the project is picking up traction I'm regretting not learning how to unit test Bash scripts earlier. While the scripts may be more integration tests than pure unit tests,...