-
Notifications
You must be signed in to change notification settings - Fork 1
Fix usage of --standard parameter and make file extension behavior work like documented. #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rk like documented.
For 1, see my comment on the bug report. For 2, I don't really know what you are asking. You can already specify a full path to a ruleset.xml file on the command line using --standard. If you happen to have your own sniffs and a directory to put them in, you specify the directory name and not the ruleset path. But I'm not entirely sure if that is what you are doing. Also note that I don't maintain this fork of PHP_CodeSniffer. Please submit all pull requests to https://github.com/squizlabs/PHP_CodeSniffer where I maintain the actually PHPCS source. Thanks |
…mework The list-style… lines were correctly merging their tokens in the CSS tokenizer post-processing but the tokenizer was not going through the curly braces and fixing up the open/close token IDs after removing a token from the array, so those values were invalid. There is now also an additional check in the PHP tokenizer during post-processing to skip functions without openers. This happens when closures are used inside other function calls. The tokenizer still needs to find some way to parse the code in there, but that's going to be a bit tricky, so muting the notices is fine for now as behaviour doesn't change. Related bug report #19188 is still open for this additional parsing.
This reverts commit 972eb2e.
…n to test out your code.
… in CASE without BREAK
Sorry about the confusion folks - I created this fork so we could make use of jenkins - Greg's cherry picked the commits he wants out of it, so his is most definately the best place for pull requests :) |
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.
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.
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