Skip to content

Commit

Permalink
Extensions specified on the CLI are now merged with those set in rule…
Browse files Browse the repository at this point in the history
…set.xml files
  • Loading branch information
gsherwood committed Jan 19, 2015
1 parent cd85152 commit 825f86a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CodeSniffer/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ public function processLongArgument($arg, $pos)
$this->values['standard'] = explode(',', $standards);
}
} else if (substr($arg, 0, 11) === 'extensions=') {
$this->values['extensions'] = explode(',', substr($arg, 11));
$this->values['extensions'] = array_merge($this->values['extensions'], explode(',', substr($arg, 11)));
} else if (substr($arg, 0, 9) === 'severity=') {
$this->values['errorSeverity'] = (int) substr($arg, 9);
$this->values['warningSeverity'] = $this->values['errorSeverity'];
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- Useful for running the phpcs and phpcbf commands without any arguments at the top of a repository
- Default file paths can now be specified in a ruleset.xml file using the "file" tag
-- File paths are only processed if no files were specified on the command line
- Extensions specified on the CLI are now merged with those set in ruleset.xml files
-- Previously, the ruleset.xml file setting replaced the CLI setting completely
- Squiz coding standard now requires lowercase PHP constants (true, false and null)
-- Removed Squiz.NamingConventions.ConstantCase sniff as the rule is now consistent across PHP and JS files
- Squiz FunctionOpeningBraceSpaceSniff no longer does additional checks for JS functions
Expand Down

0 comments on commit 825f86a

Please sign in to comment.