Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

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

Merged
westonruter merged 3 commits into
masterfrom
update/phpcs
Jun 2, 2017
Merged

Support PHPCS standard phpcs.xml file name; supply default file and command args in ruleset#243
westonruter merged 3 commits into
masterfrom
update/phpcs

Conversation

@westonruter

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant