Skip to content

Commit 34d27f7

Browse files
authored
1 parent b4f5556 commit 34d27f7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,39 @@ vendor/bin/cs2pr /path/to/checkstyle-report.xml
3131

3232
## Pipe the output of another commmand
3333

34+
... works for __any__ command which produces a checkstyle-formatted report.
35+
36+
Examples can bee seen below:
37+
3438
### Using [PHPStan](https://github.com/phpstan/phpstan)
39+
3540
```bash
3641
phpstan analyse --error-format=checkstyle | vendor/bin/cs2pr
3742
```
3843

3944
### Using [Psalm](https://github.com/vimeo/psalm)
45+
4046
```bash
4147
psalm --output-format=checkstyle | vendor/bin/cs2pr
4248
```
4349

4450
_Psalm even supports the required format natively, therefore you might even use this instead:_
51+
4552
```bash
4653
psalm --output-format=github
4754
```
4855

4956
### Using [PHP Coding Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
57+
5058
```bash
5159
php-cs-fixer --format=checkstyle | vendor/bin/cs2pr
5260
```
5361

54-
... works for __any__ command which produces a checkstyle-formatted report.
62+
### Using [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
63+
64+
```bash
65+
phpcs --report=checkstyle /path/to/code | vendor/bin/cs2pr
66+
```
5567

5668
## phpunit support?
5769

0 commit comments

Comments
 (0)