From: Chad Horohoe Date: Fri, 4 Dec 2009 14:38:43 +0000 (+0000) Subject: Put an option on checking for non-syntax errors X-Git-Tag: 1.31.0-rc.0~38630 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=d77bf016417d89f05fad5581d8133d66e623d311;p=lhc%2Fweb%2Fwiklou.git Put an option on checking for non-syntax errors --- diff --git a/maintenance/syntaxChecker.php b/maintenance/syntaxChecker.php index 86d7827bc1..bd836720bc 100644 --- a/maintenance/syntaxChecker.php +++ b/maintenance/syntaxChecker.php @@ -35,6 +35,7 @@ class SyntaxChecker extends Maintenance { false, true); $this->addOption( 'list-file', 'Text file containing list of files or directories to check', false, true); $this->addOption( 'modified', 'Check only files that were modified (requires SVN command-line client)' ); + $this->addOption( 'code-style', 'Check for code style fixes too, not just syntax validity' ); } protected function getDbType() { @@ -54,7 +55,9 @@ class SyntaxChecker extends Maintenance { } else { $this->checkFileWithCli( $f ); } - $this->checkForMistakes( $f ); + if( $this->hasOption( 'code-style' ) ) { + $this->checkForMistakes( $f ); + } } $this->output( "\nDone! " . count( $this->mFiles ) . " files checked, " . count( $this->mFailures ) . " failures and " . count( $this->mWarnings ) .