https://github.com/chassis/phpcs
A Chassis extension to install PHP_CodeSniffer on your Chassis box
https://github.com/chassis/phpcs
chassis chassis-extension php-codesniffer phpcs wordpress
Last synced: 11 months ago
JSON representation
A Chassis extension to install PHP_CodeSniffer on your Chassis box
- Host: GitHub
- URL: https://github.com/chassis/phpcs
- Owner: Chassis
- Created: 2016-12-09T05:58:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T11:19:11.000Z (about 6 years ago)
- Last Synced: 2025-04-20T20:35:51.784Z (11 months ago)
- Topics: chassis, chassis-extension, php-codesniffer, phpcs, wordpress
- Language: Puppet
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP_CodeSniffer
A Chassis extension to install and configure [PHP_CodeSniffer](http://pear.php.net/package/PHP_CodeSniffer) with [WordPress Coding Standard Sniffs](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) on your server.
## Usage
1. Add this extension to your extensions directory. `git clone git@github.com:Chassis/phpcs.git extensions/phpcs`
2. Run `vagrant provision`
3. Php_Codesniffer with WordPress Coding Standards has been installed on your Chassis VM!
## Why install this on Chassis?
This extension is handy so you can run precommit hooks with git that run phpcs tests on your Chassis box.
For instance you can add a file called `precommit` inside your `.git/hooks` folder with the following:
#!/bin/sh
/usr/local/bin/vagrant ssh -- -t 'cd /vagrant/content/; grunt precommit;'
If your project has a precommit grunt task it will run those tests and only let you commit if those tests pass.