fixed counting of errors and warnings in Plugin/PhpCodeSniffer;
use --report=emacs in Plugin/PhpCodeSniffer to not spam the logs with the full blown report but rather display a small human readable summary report
This commit is contained in:
parent
2b9302f9fc
commit
2fb162900d
1 changed files with 3 additions and 3 deletions
|
|
@ -120,7 +120,7 @@ class PhpCodeSniffer implements \PHPCI\Plugin
|
|||
return false;
|
||||
}
|
||||
|
||||
$cmd = $phpcs . ' %s %s %s %s %s "%s"';
|
||||
$cmd = $phpcs . ' --report=emacs %s %s %s %s %s "%s"';
|
||||
$success = $this->phpci->executeCommand(
|
||||
$cmd,
|
||||
$standard,
|
||||
|
|
@ -134,12 +134,12 @@ class PhpCodeSniffer implements \PHPCI\Plugin
|
|||
$output = $this->phpci->getLastOutput();
|
||||
|
||||
$matches = array();
|
||||
if (preg_match_all('/WARNING/', $output, $matches)) {
|
||||
if (preg_match_all('/\: warning \-/', $output, $matches)) {
|
||||
$this->build->storeMeta('phpcs-warnings', count($matches[0]));
|
||||
}
|
||||
|
||||
$matches = array();
|
||||
if (preg_match_all('/ERROR/', $output, $matches)) {
|
||||
if (preg_match_all('/\: error \-/', $output, $matches)) {
|
||||
$this->build->storeMeta('phpcs-errors', count($matches[0]));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue