Changeset 244
- Timestamp:
- 10/07/07 18:59:52 (9 months ago)
- Files:
-
- branches/2.3/classes/phing/tasks/ext/JslLintTask.php (modified) (5 diffs)
- branches/2.3/classes/phing/tasks/ext/PhpLintTask.php (modified) (4 diffs)
- trunk/classes/phing/tasks/ext/JslLintTask.php (modified) (5 diffs)
- trunk/classes/phing/tasks/ext/PhpLintTask.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.3/classes/phing/tasks/ext/JslLintTask.php
r200 r244 1 1 <?php 2 2 /* 3 * $Id : ZipTask.php 116 2006-09-12 09:32:50Z mrook$3 * $Id$ 4 4 * 5 5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS … … 36 36 protected $haltOnFailure = false; 37 37 protected $hasErrors = false; 38 private $badFiles = array(); 38 39 39 40 /** … … 85 86 } 86 87 87 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files');88 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in JS files:' .implode(', ',$this->badFiles)); 88 89 } 89 90 … … 106 107 { 107 108 $message = array(); 108 exec($command. $file, $message);109 exec($command.'"'.$file.'"', $message); 109 110 110 111 $summary = $message[sizeof($message) - 1]; … … 124 125 { 125 126 $this->log($file . ': ' . $errors . ' errors detected', Project::MSG_ERR); 127 $this->badFiles[] = $file; 126 128 $this->hasErrors = true; 127 129 } else { branches/2.3/classes/phing/tasks/ext/PhpLintTask.php
r226 r244 37 37 protected $haltOnFailure = false; 38 38 protected $hasErrors = false; 39 private $badFiles = array(); 39 40 40 41 /** … … 95 96 } 96 97 97 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files ');98 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files: '.implode(', ',$this->badFiles)); 98 99 } 99 100 … … 109 110 if(is_readable($file)) { 110 111 $messages = array(); 111 exec($command. $file, $messages);112 exec($command.'"'.$file.'"', $messages); 112 113 if(!preg_match('/^No syntax errors detected/', $messages[0])) { 113 114 if (count($messages) > 1) { … … 119 120 $this->log("Could not parse file", Project::MSG_ERR); 120 121 } 121 122 $this->badFiles[] = $file; 122 123 $this->hasErrors = true; 123 124 trunk/classes/phing/tasks/ext/JslLintTask.php
r200 r244 1 1 <?php 2 2 /* 3 * $Id : ZipTask.php 116 2006-09-12 09:32:50Z mrook$3 * $Id$ 4 4 * 5 5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS … … 36 36 protected $haltOnFailure = false; 37 37 protected $hasErrors = false; 38 private $badFiles = array(); 38 39 39 40 /** … … 85 86 } 86 87 87 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files');88 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in JS files:' .implode(', ',$this->badFiles)); 88 89 } 89 90 … … 106 107 { 107 108 $message = array(); 108 exec($command. $file, $message);109 exec($command.'"'.$file.'"', $message); 109 110 110 111 $summary = $message[sizeof($message) - 1]; … … 124 125 { 125 126 $this->log($file . ': ' . $errors . ' errors detected', Project::MSG_ERR); 127 $this->badFiles[] = $file; 126 128 $this->hasErrors = true; 127 129 } else { trunk/classes/phing/tasks/ext/PhpLintTask.php
r226 r244 37 37 protected $haltOnFailure = false; 38 38 protected $hasErrors = false; 39 private $badFiles = array(); 39 40 40 41 /** … … 95 96 } 96 97 97 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files ');98 if ($this->haltOnFailure && $this->hasErrors) throw new BuildException('Syntax error(s) in PHP files: '.implode(', ',$this->badFiles)); 98 99 } 99 100 … … 109 110 if(is_readable($file)) { 110 111 $messages = array(); 111 exec($command. $file, $messages);112 exec($command.'"'.$file.'"', $messages); 112 113 if(!preg_match('/^No syntax errors detected/', $messages[0])) { 113 114 if (count($messages) > 1) { … … 119 120 $this->log("Could not parse file", Project::MSG_ERR); 120 121 } 121 122 $this->badFiles[] = $file; 122 123 $this->hasErrors = true; 123 124
