-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Milestone
Description
Describe the bug
The documentation says, that a filter parameter can have one of the values {gitmodified, gitstaged}.
Code sample
phpcs -q --report=checkstyle --standard=PSR12 --filter=gitmodified --file-list=.phpcsinclude --tab-width=4 --parallel=10 | cs2prTo reproduce
Steps to reproduce the behavior:
- run the command above
- See error message displayed
PHP Fatal error: Uncaught Error: Class "\PHP_CodeSniffer\Filters\gitmodified" not found in phar:///usr/local/bin/phpcs/src/Files/FileList.php:3
Stack trace:
#0 phar:///usr/local/bin/phpcs/src/Files/FileList.php(3): PHP_CodeSniffer\Files\FileList->addFile()
#1 phar:///usr/local/bin/phpcs/src/Runner.php(3): PHP_CodeSniffer\Files\FileList->__construct()
#2 phar:///usr/local/bin/phpcs/src/Runner.php(3): PHP_CodeSniffer\Runner->run()
#3 /usr/local/bin/phpcs(6): PHP_CodeSniffer\Runner->runPHPCS()
#4 {main}
thrown in phar:///usr/local/bin/phpcs/src/Files/FileList.php on line 3Expected behaviour
The documentation states valid values. In this case: {GitModified, GitStaged}. Or the input value is converted to PascalCase.
Please confirm:
- I have searched the issue list and am not opening a duplicate issue.
- I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
- I have verified the issue still exists in the
masterbranch of PHP_CodeSniffer.
