r59731 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59730‎ | r59731 | r59732 >
Date:14:38, 4 December 2009
Author:demon
Status:ok (Comments)
Tags:
Comment:
Put an option on checking for non-syntax errors
Modified paths:
  • /trunk/phase3/maintenance/syntaxChecker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/syntaxChecker.php
@@ -35,6 +35,7 @@
3636 false, true);
3737 $this->addOption( 'list-file', 'Text file containing list of files or directories to check', false, true);
3838 $this->addOption( 'modified', 'Check only files that were modified (requires SVN command-line client)' );
 39+ $this->addOption( 'code-style', 'Check for code style fixes too, not just syntax validity' );
3940 }
4041
4142 protected function getDbType() {
@@ -54,7 +55,9 @@
5556 } else {
5657 $this->checkFileWithCli( $f );
5758 }
58 - $this->checkForMistakes( $f );
 59+ if( $this->hasOption( 'code-style' ) ) {
 60+ $this->checkForMistakes( $f );
 61+ }
5962 }
6063 $this->output( "\nDone! " . count( $this->mFiles ) . " files checked, " .
6164 count( $this->mFailures ) . " failures and " . count( $this->mWarnings ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r59736Followup r59731: Make it opt-out instead of opt-indemon15:49, 4 December 2009

Comments

#Comment by MaxSem (talk | contribs)   15:43, 4 December 2009

Why not make it an opt-out option? I'm currently working on exclusion list so that third-party code will not interfere with style checks.

#Comment by 😂 (talk | contribs)   15:49, 4 December 2009

Done, see followup rev.

Status & tagging log