From 2a8098f431177f5d79fa920b7e892334a8576301 Mon Sep 17 00:00:00 2001 From: Cam Spiers Date: Sat, 10 Aug 2013 13:28:51 +1200 Subject: [PATCH] Honour the ignore directive in Pdepend plugin --- PHPCI/Plugin/Pdepend.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PHPCI/Plugin/Pdepend.php b/PHPCI/Plugin/Pdepend.php index 74c3be81..2a26cbb0 100644 --- a/PHPCI/Plugin/Pdepend.php +++ b/PHPCI/Plugin/Pdepend.php @@ -66,14 +66,23 @@ class Pdepend implements \PHPCI\Plugin throw new \Exception(sprintf('The location %s is not writable.', $this->location)); } - $cmd = PHPCI_BIN_DIR . 'pdepend --summary-xml="%s" --jdepend-chart="%s" --overview-pyramid="%s" "%s"'; + $cmd = PHPCI_BIN_DIR . 'pdepend --summary-xml="%s" --jdepend-chart="%s" --overview-pyramid="%s" %s "%s"'; $this->removeBuildArtifacts(); + + // If we need to ignore directories + if (count($this->phpci->ignore)) { + $ignore = ' --ignore=' . implode(',', $this->phpci->ignore); + } else { + $ignore = ''; + } + $success = $this->phpci->executeCommand( $cmd, $this->location . DIRECTORY_SEPARATOR . $this->summary, $this->location . DIRECTORY_SEPARATOR . $this->chart, $this->location . DIRECTORY_SEPARATOR . $this->pyramid, + $ignore, $this->directory );