Skip to content

Commit 94ec451

Browse files
ruudkondrejmirtes
authored andcommitted
Allow setting error format in configuration
1 parent 81a4132 commit 94ec451

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

conf/config.neon

+2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ parameters:
164164
- ZEND_THREAD_SAFE
165165
customRulesetUsed: null
166166
editorUrl: null
167+
errorFormat: null
167168
__validate: true
168169

169170
extensions:
@@ -315,6 +316,7 @@ parametersSchema:
315316
scanDirectories: listOf(string())
316317
fixerTmpDir: string()
317318
editorUrl: schema(string(), nullable())
319+
errorFormat: schema(string(), nullable())
318320

319321
# irrelevant Nette parameters
320322
debugMode: bool()

src/Command/AnalyseCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
177177
throw new ShouldNotHappenException();
178178
}
179179

180+
if ($errorFormat === null) {
181+
$errorFormat = $inceptionResult->getContainer()->getParameter('errorFormat');
182+
}
183+
180184
if ($errorFormat === null) {
181185
$errorFormat = 'table';
182186
$ciDetector = new CiDetector();

0 commit comments

Comments
 (0)