Skip to content
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

Support PHPCS standard phpcs.xml file name; supply default file and command args in ruleset #243

Merged
merged 3 commits into from Jun 2, 2017

Conversation

Projects
None yet
1 participant
@westonruter
Copy link
Collaborator

commented Jun 2, 2017

This adds support for using standard PHPCS ruleset filenames phpcs.xml and phpcs.xml.dist, in addition to the custom previously-supported phpcs.ruleset.xml file. When the standard filenames are used, they do not need to be supplied on the command line and will be automatically discovered by PHPCS by traversing the directory tree, just as ESLint and any number of other tools do.

Additionally, in the past PHPCS in dev-lib would often need to get invoked like phpcs -s --extensions=php .. These arguments are now unnecessary and are supplied by the default ruleset:

  • -s: Show sniff codes in all reports
  • --extensions=php: Limit reporting to PHP files.
  • .: By indicating a default file, PHPCS won't assume to look at STDIN, allowing you to just invoke phpcs instead of phpcs ..

Fixes #231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.