http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59731

Revision: 59731
Author:   demon
Date:     2009-12-04 14:38:43 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
Put an option on checking for non-syntax errors

Modified Paths:
--------------
    trunk/phase3/maintenance/syntaxChecker.php

Modified: trunk/phase3/maintenance/syntaxChecker.php
===================================================================
--- trunk/phase3/maintenance/syntaxChecker.php  2009-12-04 13:15:11 UTC (rev 
59730)
+++ trunk/phase3/maintenance/syntaxChecker.php  2009-12-04 14:38:43 UTC (rev 
59731)
@@ -35,6 +35,7 @@
                        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 @@
                        } 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 ) .



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to