Skip to content

Commit

Permalink
Merge pull request #716 from hussainweb/phpcs-extensions
Browse files Browse the repository at this point in the history
Use triggered_by option for extensions argument for phpcs. Fixes #715.
  • Loading branch information
veewee authored Jan 9, 2020
2 parents c3cd250 + 3b783d5 commit ca851d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/tasks/phpcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ This is a list of sniffs that need to be executed. Leave this option blank to ru

*Default: [php]:

This is a list of extensions to be sniffed.
This is a list of extensions to be sniffed. This list is also passed to phpcs using the `--extensions` parameter.

**exclude**

Expand Down
1 change: 1 addition & 0 deletions src/Task/Phpcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ protected function addArgumentsFromConfig(
array $config
): ProcessArgumentsCollection {
$arguments->addOptionalCommaSeparatedArgument('--standard=%s', (array) $config['standard']);
$arguments->addOptionalCommaSeparatedArgument('--extensions=%s', (array) $config['triggered_by']);
$arguments->addOptionalArgument('--tab-width=%s', $config['tab_width']);
$arguments->addOptionalArgument('--encoding=%s', $config['encoding']);
$arguments->addOptionalArgument('--report=%s', $config['report']);
Expand Down

0 comments on commit ca851d3

Please sign in to comment.