Skip to content

Commit affec38

Browse files
committed
Verbose output - Observations:
* Error handling in Runner still needs work * Config error handling needs work Other than that, kind of looks okay
1 parent 17ab48b commit affec38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+6119
-6687
lines changed

tests/Core/Misc/Expectations/cbf-combined-q.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Time: 184ms; Memory: 6MB
12

23
PHPCBF RESULT SUMMARY
34
----------------------------------------------------------------------
@@ -8,6 +9,4 @@ tests\Core\Misc\Fixtures\test.inc 10 1
89
A TOTAL OF 10 ERRORS WERE FIXED IN 1 FILE
910
----------------------------------------------------------------------
1011

11-
Time: 181ms; Memory: 6MB
12-
1312

tests/Core/Misc/Expectations/cbf-combined-v0.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
F 1 / 1 (100%)
22

33

4+
Time: 181ms; Memory: 6MB
45

56
PHPCBF RESULT SUMMARY
67
----------------------------------------------------------------------
@@ -11,6 +12,4 @@ tests\Core\Misc\Fixtures\test.inc 10 1
1112
A TOTAL OF 10 ERRORS WERE FIXED IN 1 FILE
1213
----------------------------------------------------------------------
1314

14-
Time: 183ms; Memory: 6MB
15-
1615

tests/Core/Misc/Expectations/cbf-combined-v1.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ Registering sniffs in the PSR2 standard... DONE (43 sniffs registered)
22
Creating file list... DONE (1 files in queue)
33
Changing into directory tests\Core\Misc\Fixtures
44
Processing test.inc [161 tokens in 31 lines]... DONE in 3ms (10 fixable violations)
5-
=> Fixing file: 10/10 violations remaining => Fixing file: 11/10 violations remaining [made 1 pass]... => Fixing file: 1/10 violations remaining [made 2 passes]... => Fixing file: 0/10 violations remaining [made 3 passes]... DONE in 7ms
5+
=> Fixing file: 10/10 violations remaining => Fixing file: 11/10 violations remaining [made 1 pass]... => Fixing file: 1/10 violations remaining [made 2 passes]... => Fixing file: 0/10 violations remaining [made 3 passes]... DONE in 6ms
66
=> Fixed file written to test.inc.fixed
7+
Time: 185ms; Memory: 6MB
78

89
PHPCBF RESULT SUMMARY
910
----------------------------------------------------------------------
@@ -14,6 +15,4 @@ tests\Core\Misc\Fixtures\test.inc 10 1
1415
A TOTAL OF 10 ERRORS WERE FIXED IN 1 FILE
1516
----------------------------------------------------------------------
1617

17-
Time: 182ms; Memory: 6MB
18-
1918

tests/Core/Misc/Expectations/cbf-combined-v2.txt

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Processing ruleset src\Standards\PSR2\ruleset.xml
1212
=> src\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.php
1313
=> src\Standards\PSR2\Sniffs\Namespaces\NamespaceDeclarationSniff.php
1414
=> src\Standards\PSR2\Sniffs\Namespaces\UseDeclarationSniff.php
15+
=> set command line value --tab-width=4
1516
Processing rule "PSR1"
1617
=> src\Standards\PSR1\ruleset.xml
1718
* rule is referencing a standard using ruleset path; processing *
@@ -127,53 +128,7 @@ Processing ruleset src\Standards\PSR2\ruleset.xml
127128
=> severity set to 0
128129
Processing rule "Generic.ControlStructures.InlineControlStructure"
129130
=> src\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff.php
130-
=> set command line value --tab-width=4
131131
=> Ruleset processing complete; included 43 sniffs and excluded 0
132-
*** START PHP TOKENIZING ***
133-
Process token [0]: T_OPEN_TAG => <?php
134-
Process token [1]: T_FUNCTION => function
135-
Process token [2]: T_WHITESPACE =>
136-
Process token [3]: T_CLOSE_TAG => ?>
137-
*** END PHP TOKENIZING ***
138-
*** START PHP TOKENIZING ***
139-
Process token [0]: T_OPEN_TAG => <?php
140-
Process token 1 : T_OPEN_PARENTHESIS => (
141-
Process token [2]: T_CLOSE_TAG => ?>
142-
*** END PHP TOKENIZING ***
143-
*** START PHP TOKENIZING ***
144-
Process token [0]: T_OPEN_TAG => <?php
145-
Process token 1 : T_SEMICOLON => ;
146-
Process token [2]: T_CLOSE_TAG => ?>
147-
*** END PHP TOKENIZING ***
148-
*** START PHP TOKENIZING ***
149-
Process token [0]: T_OPEN_TAG => <?php
150-
Process token [1]: T_FUNCTION => function
151-
Process token [2]: T_WHITESPACE =>
152-
Process token [3]: T_CLOSE_TAG => ?>
153-
*** END PHP TOKENIZING ***
154-
*** START PHP TOKENIZING ***
155-
Process token [0]: T_OPEN_TAG => <?php
156-
Process token 1 : T_OPEN_PARENTHESIS => (
157-
Process token [2]: T_CLOSE_TAG => ?>
158-
*** END PHP TOKENIZING ***
159-
*** START PHP TOKENIZING ***
160-
Process token [0]: T_OPEN_TAG => <?php
161-
Process token [1]: T_ABSTRACT => abstract
162-
Process token [2]: T_WHITESPACE =>
163-
Process token [3]: T_FUNCTION => function
164-
Process token [4]: T_WHITESPACE =>
165-
Process token [5]: T_CLOSE_TAG => ?>
166-
*** END PHP TOKENIZING ***
167-
*** START PHP TOKENIZING ***
168-
Process token [0]: T_OPEN_TAG => <?php
169-
Process token 1 : T_OPEN_PARENTHESIS => (
170-
Process token [2]: T_CLOSE_TAG => ?>
171-
*** END PHP TOKENIZING ***
172-
*** START PHP TOKENIZING ***
173-
Process token [0]: T_OPEN_TAG => <?php
174-
Process token 1 : T_SEMICOLON => ;
175-
Process token [2]: T_CLOSE_TAG => ?>
176-
*** END PHP TOKENIZING ***
177132
Creating file list... DONE (1 files in queue)
178133
Changing into directory tests\Core\Misc\Fixtures
179134
Processing test.inc
@@ -756,7 +711,7 @@ Processing test.inc
756711
* token 63 on line 15 changed from T_OPEN_PARENTHESIS to T_TYPE_OPEN_PARENTHESIS
757712
*** END ADDITIONAL PHP PROCESSING ***
758713
[161 tokens in 31 lines]...
759-
DONE in 9ms (10 fixable violations)
714+
DONE in 6ms (10 fixable violations)
760715
=> Fixing file: 10/10 violations remaining
761716
=> Changeset started by Squiz.WhiteSpace.ScopeKeywordSpacing:151
762717
Q: Squiz.WhiteSpace.ScopeKeywordSpacing:161 replaced token 15 (T_WHITESPACE on line 6) " class" => " class"
@@ -786,13 +741,14 @@ DONE in 9ms (10 fixable violations)
786741
PSR2.ControlStructures.ControlStructureSpacing:132 replaced token 92 (T_WHITESPACE on line 18) " )" => ")"
787742
=> Fixing file: 11/10 violations remaining [made 1 pass]...
788743
* fixed 11 violations, starting loop 2 *
789-
Generic.WhiteSpace.ScopeIndent:1352 replaced token 72 (T_OPEN_CURLY_BRACKET on line 17) "{" => " {"
744+
Generic.WhiteSpace.ScopeIndent:1353 replaced token 72 (T_OPEN_CURLY_BRACKET on line 17) "{" => " {"
790745
* token 72 has already been modified, skipping *
791746
=> Fixing file: 1/10 violations remaining [made 2 passes]...
792747
* fixed 1 violations, starting loop 3 *
793748
=> Fixing file: 0/10 violations remaining [made 3 passes]...
794-
DONE in 10ms
749+
DONE in 9ms
795750
=> Fixed file written to test.inc.fixed
751+
Time: 191ms; Memory: 6MB
796752

797753
PHPCBF RESULT SUMMARY
798754
----------------------------------------------------------------------
@@ -803,6 +759,4 @@ tests\Core\Misc\Fixtures\test.inc 10 1
803759
A TOTAL OF 10 ERRORS WERE FIXED IN 1 FILE
804760
----------------------------------------------------------------------
805761

806-
Time: 196ms; Memory: 6MB
807-
808762

tests/Core/Misc/Expectations/cbf-combined-v3.txt

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Processing ruleset src\Standards\PSR2\ruleset.xml
1212
=> src\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.php
1313
=> src\Standards\PSR2\Sniffs\Namespaces\NamespaceDeclarationSniff.php
1414
=> src\Standards\PSR2\Sniffs\Namespaces\UseDeclarationSniff.php
15+
=> set command line value --tab-width=4
1516
Processing rule "PSR1"
1617
=> src\Standards\PSR1\ruleset.xml
1718
* rule is referencing a standard using ruleset path; processing *
@@ -127,7 +128,6 @@ Processing ruleset src\Standards\PSR2\ruleset.xml
127128
=> severity set to 0
128129
Processing rule "Generic.ControlStructures.InlineControlStructure"
129130
=> src\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff.php
130-
=> set command line value --tab-width=4
131131
=> Ruleset processing complete; included 43 sniffs and excluded 0
132132
Registered PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\ClassDeclarationSniff
133133
Registered PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\PropertyDeclarationSniff
@@ -172,51 +172,6 @@ Registered PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ForEachLoopD
172172
Registered PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ForLoopDeclarationSniff
173173
Registered PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\LowercaseDeclarationSniff
174174
Registered PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff
175-
*** START PHP TOKENIZING ***
176-
Process token [0]: T_OPEN_TAG => <?php
177-
Process token [1]: T_FUNCTION => function
178-
Process token [2]: T_WHITESPACE =>
179-
Process token [3]: T_CLOSE_TAG => ?>
180-
*** END PHP TOKENIZING ***
181-
*** START PHP TOKENIZING ***
182-
Process token [0]: T_OPEN_TAG => <?php
183-
Process token 1 : T_OPEN_PARENTHESIS => (
184-
Process token [2]: T_CLOSE_TAG => ?>
185-
*** END PHP TOKENIZING ***
186-
*** START PHP TOKENIZING ***
187-
Process token [0]: T_OPEN_TAG => <?php
188-
Process token 1 : T_SEMICOLON => ;
189-
Process token [2]: T_CLOSE_TAG => ?>
190-
*** END PHP TOKENIZING ***
191-
*** START PHP TOKENIZING ***
192-
Process token [0]: T_OPEN_TAG => <?php
193-
Process token [1]: T_FUNCTION => function
194-
Process token [2]: T_WHITESPACE =>
195-
Process token [3]: T_CLOSE_TAG => ?>
196-
*** END PHP TOKENIZING ***
197-
*** START PHP TOKENIZING ***
198-
Process token [0]: T_OPEN_TAG => <?php
199-
Process token 1 : T_OPEN_PARENTHESIS => (
200-
Process token [2]: T_CLOSE_TAG => ?>
201-
*** END PHP TOKENIZING ***
202-
*** START PHP TOKENIZING ***
203-
Process token [0]: T_OPEN_TAG => <?php
204-
Process token [1]: T_ABSTRACT => abstract
205-
Process token [2]: T_WHITESPACE =>
206-
Process token [3]: T_FUNCTION => function
207-
Process token [4]: T_WHITESPACE =>
208-
Process token [5]: T_CLOSE_TAG => ?>
209-
*** END PHP TOKENIZING ***
210-
*** START PHP TOKENIZING ***
211-
Process token [0]: T_OPEN_TAG => <?php
212-
Process token 1 : T_OPEN_PARENTHESIS => (
213-
Process token [2]: T_CLOSE_TAG => ?>
214-
*** END PHP TOKENIZING ***
215-
*** START PHP TOKENIZING ***
216-
Process token [0]: T_OPEN_TAG => <?php
217-
Process token 1 : T_SEMICOLON => ;
218-
Process token [2]: T_CLOSE_TAG => ?>
219-
*** END PHP TOKENIZING ***
220175
Creating file list... DONE (1 files in queue)
221176
Changing into directory tests\Core\Misc\Fixtures
222177
Processing test.inc
@@ -936,7 +891,7 @@ Processing test.inc
936891
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\LowercaseFunctionKeywordsSniff... DONE in 0 seconds
937892
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\FunctionDeclarationArgumentSpacingSniff... DONE in 0 seconds
938893
Processing PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff... DONE in 0 seconds
939-
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff... DONE in 0.0005 seconds
894+
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff... DONE in 0.0006 seconds
940895
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff... DONE in 0 seconds
941896
Process token 58: T_WHITESPACE =>
942897
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff... DONE in 0 seconds
@@ -1154,44 +1109,44 @@ Processing test.inc
11541109
Processing PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff... DONE in 0 seconds
11551110
*** END TOKEN PROCESSING ***
11561111
*** START SNIFF PROCESSING REPORT ***
1157-
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff: 0.0005 secs
1158-
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff: 0.0003 secs
1112+
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff: 0.0006 secs
1113+
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff: 0.0004 secs
11591114
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\ScopeIndentSniff: 0.0002 secs
11601115
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\FunctionCallArgumentSpacingSniff: 0.0001 secs
11611116
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\FunctionCallSignatureSniff: 0.0001 secs
11621117
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff: 0.0001 secs
11631118
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\DisallowMultipleStatementsSniff: 0.0001 secs
11641119
PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowTabIndentSniff: 0.0001 secs
11651120
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseConstantSniff: 0.0001 secs
1166-
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseKeywordSniff: 0 secs
1121+
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseKeywordSniff: 0.0001 secs
11671122
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeClosingBraceSniff: 0 secs
11681123
PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\ClassDeclarationSniff: 0 secs
1169-
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff: 0 secs
11701124
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff: 0 secs
11711125
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\FunctionDeclarationArgumentSpacingSniff: 0 secs
1126+
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff: 0 secs
11721127
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\FunctionDeclarationSniff: 0 secs
11731128
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ScopeKeywordSpacingSniff: 0 secs
1129+
PHP_CodeSniffer\Standards\PSR1\Sniffs\Files\SideEffectsSniff: 0 secs
11741130
PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\PropertyDeclarationSniff: 0 secs
11751131
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\SwitchDeclarationSniff: 0 secs
1176-
PHP_CodeSniffer\Standards\PSR1\Sniffs\Files\SideEffectsSniff: 0 secs
11771132
PHP_CodeSniffer\Standards\PSR2\Sniffs\Files\EndFileNewlineSniff: 0 secs
1133+
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff: 0 secs
11781134
PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ControlStructureSpacingSniff: 0 secs
11791135
PHP_CodeSniffer\Standards\PSR2\Sniffs\Files\ClosingTagSniff: 0 secs
1180-
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff: 0 secs
11811136
PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff: 0 secs
11821137
PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff: 0 secs
11831138
PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope\MethodScopeSniff: 0 secs
1184-
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff: 0 secs
11851139
PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces\NamespaceDeclarationSniff: 0 secs
1186-
PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes\ClassDeclarationSniff: 0 secs
1140+
PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\ValidDefaultValueSniff: 0 secs
11871141
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\ControlSignatureSniff: 0 secs
1142+
PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes\ClassDeclarationSniff: 0 secs
11881143
PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\LowercaseFunctionKeywordsSniff: 0 secs
11891144
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowShortOpenTagSniff: 0 secs
11901145
PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\FunctionClosingBraceSniff: 0 secs
11911146
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineEndingsSniff: 0 secs
11921147
PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures\LowercaseDeclarationSniff: 0 secs
11931148
*** END SNIFF PROCESSING REPORT ***
1194-
DONE in 12ms (10 fixable violations)
1149+
DONE in 8ms (10 fixable violations)
11951150
=> Fixing file: 10/10 violations remaining
11961151
---START FILE CONTENT---
11971152
1|<?php
@@ -1291,7 +1246,7 @@ DONE in 12ms (10 fixable violations)
12911246
33|(new Foo)->echo(param: false);
12921247
34|
12931248
--- END FILE CONTENT ---
1294-
Generic.WhiteSpace.ScopeIndent:1352 replaced token 72 (T_OPEN_CURLY_BRACKET on line 17) "{" => " {"
1249+
Generic.WhiteSpace.ScopeIndent:1353 replaced token 72 (T_OPEN_CURLY_BRACKET on line 17) "{" => " {"
12951250
* token 72 has already been modified, skipping *
12961251
=> Fixing file: 1/10 violations remaining [made 2 passes]...
12971252
* fixed 1 violations, starting loop 3 *
@@ -1332,8 +1287,9 @@ DONE in 12ms (10 fixable violations)
13321287
34|
13331288
--- END FILE CONTENT ---
13341289
=> Fixing file: 0/10 violations remaining [made 3 passes]...
1335-
DONE in 12ms
1290+
DONE in 11ms
13361291
=> Fixed file written to test.inc.fixed
1292+
Time: 194ms; Memory: 6MB
13371293

13381294
PHPCBF RESULT SUMMARY
13391295
----------------------------------------------------------------------
@@ -1344,6 +1300,4 @@ tests\Core\Misc\Fixtures\test.inc 10 1
13441300
A TOTAL OF 10 ERRORS WERE FIXED IN 1 FILE
13451301
----------------------------------------------------------------------
13461302

1347-
Time: 201ms; Memory: 6MB
1348-
13491303

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Time: 180ms; Memory: 6MB
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
F 1 / 1 (100%)
2+
3+
4+
Time: 181ms; Memory: 6MB

tests/Core/Misc/Expectations/cbf-stderr-v1.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Registering sniffs in the PSR2 standard... DONE (43 sniffs registered)
2+
Creating file list... DONE (1 files in queue)
3+
Changing into directory tests\Core\Misc\Fixtures
4+
Processing test.inc [161 tokens in 31 lines]... DONE in 3ms (10 fixable violations)
5+
=> Fixing file: 10/10 violations remaining => Fixing file: 11/10 violations remaining [made 1 pass]... => Fixing file: 1/10 violations remaining [made 2 passes]... => Fixing file: 0/10 violations remaining [made 3 passes]... DONE in 7ms
6+
=> Fixed file written to test.inc.fixed
7+
Time: 184ms; Memory: 6MB

0 commit comments

Comments
 (0)