codeclimate / codeclimate-phpcodesniffer

Code Climate Engine for PHP Code Sniffer
MIT License
28 stars 23 forks source link

Added support for WordPress coding standards #29

Closed soderlind closed 8 years ago

soderlind commented 8 years ago

Should fix #15

soderlind commented 8 years ago

The failed checks are not because of my change, please view the error log at CircleCI

josephdpurcell commented 8 years ago

I believe rebasing on master will fix the test failures shown in the latest pass.

I have created a similar PR https://github.com/codeclimate/codeclimate-phpcodesniffer/pull/31 for Drupal. Perhaps we can standardize on a similar approach? I like the idea of having separate RUN statements.

One thing you may need to add is the list of sniffs in Sniffs.php, otherwise I believe it throws an error. You should be able to generate the list of sniffs with phpcs -e --standard="WordPress,WordPress-Core,WordPress-Docs,WordPress-Extra,WordPress-VIP"

josephdpurcell commented 8 years ago

I believe https://github.com/codeclimate/codeclimate-phpcodesniffer/pull/34 deprecates the need for this PR.

dblandin commented 8 years ago

Hey @soderlind,

We ended up taking a different route here via a composer dependency in #34. Thanks for this PR and enjoy the Wordpress checks! They're available now via the CLI and we should have this out to codeclimate.com sometime tomorrow.

Thanks!

dblandin commented 8 years ago

Hey @soderlind,

Just wanted to follow up and let you know that we've released a new engine image to [codeclimate.com]() with the new Wordpress coding standards.

You can enable the standards today by updating your codeclimate.yml configuration file:

phpcodesniffer:
  enabled: true
  config:
    standard: "Wordpress"

The full list of supported standards is now available in our README.

Thanks for the nudge on this!