bjornjohansen / wp-pre-commit-hook
Pre-commit hook for WordPress projects
Installs: 7 913
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 1
Forks: 4
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: ^1.0
- dealerdirect/phpcodesniffer-composer-installer: *
- phpcompatibility/phpcompatibility-wp: *
- wp-coding-standards/wpcs: *
README
Pre-commit hook for WordPress projects.
This package will install PHPCS with the WordPress Coding Standard definitions together with a git pre-commit hook script that will run PHP linting and the PHPCS whenever you do a commit to your project.
If your project has a phpcs.ruleset.xml
or phpcs.xml.dist
file available, the pre-commit hook will use this file as a ruleset definition. Otherwise the “WordPress” ruleset will be used.
Installation
composer require bjornjohansen/wp-pre-commit-hook --dev
Or manually add "bjornjohansen/wp-pre-commit-hook": "*"
to the require-dev
section in your composer.json
Then do a composer update