Thursday, 17 July 2008

PHP_CodeSniffer 1.1.0 released

I uploaded the 1.1.0 stable release of PHP_CodeSniffer earlier this week. This version has been a long time coming, but does include a lot of changes. The most exciting (for me) is the ability to sniff JavaScript files and find coding standard errors within them.

We have been using this feature internally at Squiz for a few months to start cleaning up our JavaScript files and make them, as much as we can, conform to our PHP coding standards. This allows developers to move more freely between PHP and JavaScript code throughout the day.

The other great addition was contributed to me by Jake Bates and allows PHP_CodeSniffer to be used within an SVN pre-commit hook. This allows code that violates your coding standard to be blocked from your code repository; an extreme but sometimes necessary rule.

You can view the full changelog and download the release on the package download page.