Skip to content

Commit 7c4819c

Browse files
davidjulienfalque
authored andcommitted
Added describe command to readme
1 parent cb3bdd6 commit 7c4819c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

README.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,21 @@ would be default in next MAJOR release (unified differ, estimating, full-width p
254254
255255
$ PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer.phar fix -v --diff
256256
257+
Rules
258+
-----
259+
260+
Use the following command to quickly understand what a rule will do to your code:
261+
262+
.. code-block:: bash
263+
264+
$ php php-cs-fixer.phar describe align_multiline_comment
265+
266+
To visualize all the rules that belong to a ruleset:
267+
268+
.. code-block:: bash
269+
270+
$ php php-cs-fixer.phar describe @PSR2
271+
257272
Choose from the list of available rules:
258273

259274
* **align_multiline_comment** [@PhpCsFixer]

src/Console/Command/HelpCommand.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ public static function getHelpCopy()
143143
144144
<info>$ PHP_CS_FIXER_FUTURE_MODE=1 php %command.full_name% -v --diff</info>
145145
146+
Rules
147+
-----
148+
149+
Use the following command to quickly understand what a rule will do to your code:
150+
151+
<info>$ php php-cs-fixer.phar describe align_multiline_comment</info>
152+
153+
To visualize all the rules that belong to a ruleset:
154+
155+
<info>$ php php-cs-fixer.phar describe @PSR2</info>
156+
146157
Choose from the list of available rules:
147158
148159
%%%FIXERS_DETAILS%%%

0 commit comments

Comments
 (0)