File tree 3 files changed +28
-2
lines changed
3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ grumphp:
31
31
triggered_by : [php]
32
32
exclude : []
33
33
show_sniffs_error_path : true
34
+ parallel : null
34
35
` ` `
35
36
36
37
**standard**
@@ -136,6 +137,12 @@ A list of rules that should not be checked. Leave this option blank to run all c
136
137
137
138
Displays the sniff that triggered the error, allowing you to more easily find the specific rules with their namespaces.
138
139
140
+ **parallel**
141
+
142
+ *Default: null*
143
+
144
+ Determines the number of processes that phpcs / phpcbf will use when running. Defaults to a single process.
145
+
139
146
# # Framework presets
140
147
141
148
# ## Symfony 2
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ public static function getConfigurableOptions(): ConfigOptionsResolver
47
47
'report ' => 'full ' ,
48
48
'report_width ' => null ,
49
49
'exclude ' => [],
50
- 'show_sniffs_error_path ' => true
50
+ 'show_sniffs_error_path ' => true ,
51
+ 'parallel ' => null ,
51
52
]);
52
53
53
54
$ resolver ->addAllowedTypes ('standard ' , ['array ' , 'null ' , 'string ' ]);
@@ -64,6 +65,7 @@ public static function getConfigurableOptions(): ConfigOptionsResolver
64
65
$ resolver ->addAllowedTypes ('report_width ' , ['null ' , 'int ' ]);
65
66
$ resolver ->addAllowedTypes ('exclude ' , ['array ' ]);
66
67
$ resolver ->addAllowedTypes ('show_sniffs_error_path ' , ['bool ' ]);
68
+ $ resolver ->addAllowedTypes ('parallel ' , ['null ' , 'int ' ]);
67
69
68
70
return ConfigOptionsResolver::fromOptionsResolver ($ resolver );
69
71
}
@@ -161,6 +163,7 @@ private function addArgumentsFromConfig(
161
163
$ arguments ->addOptionalCommaSeparatedArgument ('--ignore=%s ' , $ config ['ignore_patterns ' ]);
162
164
$ arguments ->addOptionalCommaSeparatedArgument ('--exclude=%s ' , $ config ['exclude ' ]);
163
165
$ arguments ->addOptionalArgument ('-s ' , $ config ['show_sniffs_error_path ' ]);
166
+ $ arguments ->addOptionalArgument ('--parallel=%s ' , $ config ['parallel ' ]);
164
167
165
168
return $ arguments ;
166
169
}
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ public function provideConfigurableOptions(): iterable
49
49
'report ' => 'full ' ,
50
50
'report_width ' => null ,
51
51
'exclude ' => [],
52
- 'show_sniffs_error_path ' => true
52
+ 'show_sniffs_error_path ' => true ,
53
+ 'parallel ' => null ,
53
54
]
54
55
];
55
56
}
@@ -357,6 +358,21 @@ public function provideExternalTaskRuns(): iterable
357
358
$ this ->expectFileList ('hello.php ' .PHP_EOL .'hello2.php ' ),
358
359
]
359
360
];
361
+ yield 'parallel ' => [
362
+ [
363
+ 'parallel ' => 4 ,
364
+ ],
365
+ $ this ->mockContext (RunContext::class, ['hello.php ' , 'hello2.php ' ]),
366
+ 'phpcs ' ,
367
+ [
368
+ '--extensions=php ' ,
369
+ '--report=full ' ,
370
+ '-s ' ,
371
+ '--parallel=4 ' ,
372
+ '--report-json ' ,
373
+ $ this ->expectFileList ('hello.php ' .PHP_EOL .'hello2.php ' ),
374
+ ]
375
+ ];
360
376
}
361
377
362
378
private function expectFileList (string $ expectedContents ): callable
You can’t perform that action at this time.
0 commit comments