Adding PHPCS report parsing.
This commit is contained in:
parent
28b64a2ad9
commit
2363775e34
1 changed files with 4 additions and 0 deletions
|
|
@ -151,6 +151,8 @@ class PhpCodeSniffer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->phpci->logExecOutput(false);
|
||||
|
||||
$cmd = $phpcs . ' --report=json %s %s %s %s %s "%s"';
|
||||
$this->phpci->executeCommand(
|
||||
$cmd,
|
||||
|
|
@ -165,6 +167,8 @@ class PhpCodeSniffer implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
|
|||
$output = $this->phpci->getLastOutput();
|
||||
list($errors, $warnings, $data) = $this->processReport(json_decode(trim($output), true));
|
||||
|
||||
$this->phpci->logExecOutput(true);
|
||||
|
||||
$success = true;
|
||||
$this->build->storeMeta('phpcs-warnings', $warnings);
|
||||
$this->build->storeMeta('phpcs-errors', $errors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue