pear/PHP_CodeSniffer — pull request #3 by das-peter (2012-02-03 17:13:11+00:00)
Title: Fix usage of --standard parameter and make file extension behavior work like documented.

Hi there,

We're working on a Sniff for Drupal: http://drupal.org/project/drupalcs
While doing so we came across two issues I fixed in this commit.

1. File Extensions:
Bug: https://pear.php.net/bugs/bug.php?id=19246
Drupal Issue: http://drupal.org/node/1414902#comment-5507580
According to the advanced usage documentation (http://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php) extensions are ignored if a file is explicitly passed. That's not the case atm. we should decide whether to change the code (my favourite) or the documentation.

2. Use a path as --standard
Bug: http://pear.php.net/bugs/bug.php?id=19144 (Not sure if really related)
Drupal Issue: http://drupal.org/node/1354722
Currently it's impossible to use the own standard in the ruleset.xml if --standard is set to a file path. The autoloader as well as PHP_CodeSniffer::_expandRulesetReference() throw errors doing so.

Feedback would be very welcome :)

Thanks
Peter