Skip to content

Commit 064434f

Browse files
committed
Wiki/Reporting: improve report display
1 parent d5ac853 commit 064434f

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 @@
@@ -441,7 +444,8 @@ PHP_CodeSniffer can output a JSON report to allow you to parse the output and us
441444
442445
```bash
443446
$ phpcs --report=json /path/to/code
444-
447+
```
448+
```json
445449
{
446450
"totals": {
447451
"errors": 4,
@@ -520,7 +524,8 @@ PHP_CodeSniffer can output an XML report similar to the one produced by JUnit, a
520524
521525
```bash
522526
$ phpcs --report=junit /path/to/code
523-
527+
```
528+
```xml
524529
<?xml version="1.0" encoding="UTF-8"?>
525530
<testsuites name="PHP_CodeSniffer x.x.x" tests="6" failures="5">
526531
<testsuite name="/path/to/code/classA.php" tests="5" failures="5">
@@ -612,7 +617,8 @@ PHP_CodeSniffer can output an XML report to allow you to parse the output and us
612617
613618
```bash
614619
$ phpcs --report=xml /path/to/code
615-
620+
```
621+
```xml
616622
<?xml version="1.0" encoding="UTF-8"?>
617623
<phpcs version="x.x.x">
618624
<file name="/path/to/code/classA.php" errors="4" warnings="1" fixable="3">

0 commit comments

Comments
 (0)