UI plugins, including quality trend chart, logs and lines of code. Some UI tweaks.

This commit is contained in:
Dan Cryer 2013-10-08 07:21:46 +01:00
commit b33189e08e
28 changed files with 2778 additions and 217 deletions

View file

@ -106,6 +106,20 @@ class PhpCodeSniffer implements \PHPCI\Plugin
}
$cmd = PHPCI_BIN_DIR . 'phpcs %s %s %s %s %s "%s"';
return $this->phpci->executeCommand($cmd, $standard, $suffixes, $ignore, $tab_width, $encoding, $this->phpci->buildPath . $this->path);
$success = $this->phpci->executeCommand($cmd, $standard, $suffixes, $ignore, $tab_width, $encoding, $this->phpci->buildPath . $this->path);
$output = $this->phpci->getLastOutput();
$matches = array();
if (preg_match_all('/WARNING/', $output, $matches)) {
$this->phpci->storeBuildMeta('phpcs-warnings', count($matches[0]));
}
$matches = array();
if (preg_match_all('/ERROR/', $output, $matches)) {
$this->phpci->storeBuildMeta('phpcs-errors', count($matches[0]));
}
return $success;
}
}