10up / 10up-code-review

Custom PHP_CodeSniffer rules to help flag common issues during code review
43 stars 5 forks source link

Update standards path #3

Closed stevegrunwell closed 8 years ago

stevegrunwell commented 8 years ago

The documentation needs updating, as we need to register two paths within PHP_CodeSniffer:

  1. The path to our package's standards
  2. vendor/wp-coding-standards/wpcs within our repo

Without these, we may run into Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff "WordPress-Extra" does not exist' errors, which is :-1:

These values can be concatenated with a comma, but in the future it might make sense to automatically register these in a post-install/post-update command (though we'd want to ensure we're not overwriting existing config options blindly, which is the only reason we're not doing that now).