Skip to content

Commit c1f3726

Browse files
committed
Wiki/Reporting: improve report display
1 parent d10a546 commit c1f3726

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

wiki/Reporting.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ PHP_CodeSniffer can output an XML report similar to the one produced by Checksty
262262
263263
```bash
264264
$ phpcs --report=checkstyle /path/to/code
265-
265+
```
266+
```xml
266267
<?xml version="1.0" encoding="UTF-8"?>
267268
<checkstyle version="x.x.x">
268269
<file name="/path/to/code/classA.php">
@@ -284,7 +285,8 @@ PHP_CodeSniffer can output a CSV report to allow you to parse the output and use
284285
285286
```bash
286287
$ phpcs --report=csv /path/to/code
287-
288+
```
289+
```csv
288290
File,Line,Column,Type,Message,Source,Severity,Fixable
289291
"/path/to/code/classA.php",2,1,error,"Missing file doc comment",PEAR.Commenting.FileComment.Missing,5,0
290292
"/path/to/code/classA.php",4,12,error,"TRUE, FALSE and NULL must be lowercase; expected \"false\" but found \"FALSE\"",Generic.PHP.LowerCaseConstant.Found,5,1
@@ -308,7 +310,8 @@ PHP_CodeSniffer can output a diff file that can be applied using the `patch` com
308310
309311
```bash
310312
$ phpcs --report=diff /path/to/code
311-
313+
```
314+
```diff
312315
--- /path/to/code/file.php
313316
+++ PHP_CodeSniffer
314317
@@ -1,8 +1,8 @@
@@ -449,7 +452,8 @@ PHP_CodeSniffer can output a JSON report to allow you to parse the output and us
449452
450453
```bash
451454
$ phpcs --report=json /path/to/code
452-
455+
```
456+
```json
453457
{
454458
"totals": {
455459
"errors": 4,
@@ -528,7 +532,8 @@ PHP_CodeSniffer can output an XML report similar to the one produced by JUnit, a
528532
529533
```bash
530534
$ phpcs --report=junit /path/to/code
531-
535+
```
536+
```xml
532537
<?xml version="1.0" encoding="UTF-8"?>
533538
<testsuites name="PHP_CodeSniffer x.x.x" tests="6" failures="5">
534539
<testsuite name="/path/to/code/classA.php" tests="5" failures="5">
@@ -620,7 +625,8 @@ PHP_CodeSniffer can output an XML report to allow you to parse the output and us
620625
621626
```bash
622627
$ phpcs --report=xml /path/to/code
623-
628+
```
629+
```xml
624630
<?xml version="1.0" encoding="UTF-8"?>
625631
<phpcs version="x.x.x">
626632
<file name="/path/to/code/classA.php" errors="4" warnings="1" fixable="3">

0 commit comments

Comments
 (0)