Reducing command line args required for running PHPCS

When you run JSHint, the only thing you need to put on the command line is: jshint. No additional arguments are required to check JS files under the current directory, and it automatically looks for a .jshintrc file for its configuration. For years now when I’ve wanted to similarly run PHP_CodeSniffer to check the adherence of some PHP code against coding standards, … Continue reading Reducing command line args required for running PHPCS

Registering Project-specific PHP_CodeSniffer Rulesets in PhpStorm

In wp-dev-lib we have followed a convention of naming our project-specific PHP_CodeSniffer rulesets as phpcs.ruleset.xml. We named the ruleset files with “phpcs” in the filename to make it clear what kind of ruleset it is, and so that it would conflict with any other tool that may also want to use this name. Nevertheless, PHP_CodeSniffer … Continue reading Registering Project-specific PHP_CodeSniffer Rulesets in PhpStorm