Skip to content

Commit 113a85b

Browse files
committed
Updated changelog + help text for #2137
1 parent 3662148 commit 113a85b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ http://pear.php.net/dtd/package-2.0.xsd">
2626
</stability>
2727
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
2828
<notes>
29+
- Added support for only checking files that have been locally staged in a git repo
30+
-- Use --filter=gitstaged to check these files
31+
-- You still need to give PHPCS a list of files or directories in which to apply the filter
32+
-- Thanks to Juliette Reinders Folmer for the contribution
2933
- Fixed bug #2478 : FunctionCommentThrowTag.WrongNumber when exception is thrown once but built conditionally
3034
- Fixed bug #2479 : Generic.WhiteSpace.ScopeIndent error when using array destructuring with exact indent checking
3135
</notes>

src/Config.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,8 +1402,9 @@ public function printPHPCSUsage()
14021402
echo ' e.g., module/php,es/js'.PHP_EOL;
14031403
echo ' <file> One or more files and/or directories to check'.PHP_EOL;
14041404
echo ' <fileList> A file containing a list of files and/or directories to check (one per line)'.PHP_EOL;
1405-
echo ' <filter> Use the "gitmodified" filter, or specify the path to a custom filter class'.PHP_EOL;
1406-
echo ' <generator> Uses either the "HTML", "Markdown" or "Text" generator'.PHP_EOL;
1405+
echo ' <filter> Use either the "gitmodified" or "gitstaged" filter,'.PHP_EOL;
1406+
echo ' or specify the path to a custom filter class'.PHP_EOL;
1407+
echo ' <generator> Use either the "HTML", "Markdown" or "Text" generator'.PHP_EOL;
14071408
echo ' (forces documentation generation instead of checking)'.PHP_EOL;
14081409
echo ' <patterns> A comma separated list of patterns to ignore files and directories'.PHP_EOL;
14091410
echo ' <processes> How many files should be checked simultaneously (default is 1)'.PHP_EOL;
@@ -1463,7 +1464,8 @@ public function printPHPCBFUsage()
14631464
echo ' e.g., module/php,es/js'.PHP_EOL;
14641465
echo ' <file> One or more files and/or directories to fix'.PHP_EOL;
14651466
echo ' <fileList> A file containing a list of files and/or directories to fix (one per line)'.PHP_EOL;
1466-
echo ' <filter> Use the "gitmodified" filter, or specify the path to a custom filter class'.PHP_EOL;
1467+
echo ' <filter> Use either the "gitmodified" or "gitstaged" filter,'.PHP_EOL;
1468+
echo ' or specify the path to a custom filter class'.PHP_EOL;
14671469
echo ' <patterns> A comma separated list of patterns to ignore files and directories'.PHP_EOL;
14681470
echo ' <processes> How many files should be fixed simultaneously (default is 1)'.PHP_EOL;
14691471
echo ' <severity> The minimum severity required to fix an error or warning'.PHP_EOL;

0 commit comments

Comments
 (0)