r81562 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81561‎ | r81562 | r81563 >
Date:13:54, 5 February 2011
Author:hashar
Status:resolved
Tags:
Comment:
doxygen: add support for EXCLUDE keyword
Modified paths:
  • /trunk/phase3/maintenance/Doxyfile (modified) (history)
  • /trunk/phase3/maintenance/mwdocgen.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mwdocgen.php
@@ -69,9 +69,15 @@
7070 $mwPathM = $mwPath . 'maintenance/';
7171 $mwPathS = $mwPath . 'skins/';
7272
 73+/** Ignored paths relative to $mwPath */
 74+$mwExcludePaths = array(
 75+ 'images',
 76+ 'static',
 77+);
 78+
7379 /** Variable to get user input */
7480 $input = '';
75 -$exclude = '';
 81+$exclude_patterns = '';
7682
7783 #
7884 # Functions
@@ -142,13 +148,18 @@
143149 * @param $currentVersion String: Version number of the software
144150 * @param $svnstat String: path to the svnstat file
145151 * @param $input String: Path to analyze.
146 - * @param $exclude String: Additionals path regex to exclude
 152+ * @param $exclude_patterns String: Additionals path regex to exclude
147153 * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded)
148154 */
149 -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude ) {
 155+function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude_patterns ) {
150156
151157 $template = file_get_contents( $doxygenTemplate );
152158
 159+ // Generate path exclusions
 160+ global $mwExcludePaths, $mwPath;
 161+ $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths );
 162+ print "EXCLUDE: $excludedPaths\n\n";
 163+
153164 // Replace template placeholders by correct values.
154165 $replacements = array(
155166 '{{OUTPUT_DIRECTORY}}' => $outputDirectory,
@@ -156,7 +167,8 @@
157168 '{{CURRENT_VERSION}}' => $currentVersion,
158169 '{{SVNSTAT}}' => $svnstat,
159170 '{{INPUT}}' => $input,
160 - '{{EXCLUDE}}' => $exclude,
 171+ '{{EXCLUDE}}' => $excludedPaths,
 172+ '{{EXCLUDE_PATTERNS}}' => $exclude_patterns,
161173 '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
162174 );
163175 $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
@@ -224,7 +236,7 @@
225237 $input = $mwPath . $file;
226238 case 6:
227239 $input = $mwPath;
228 - $exclude = 'extensions';
 240+ $exclude_patterns = 'extensions';
229241 }
230242
231243 $versionNumber = getSvnRevision( $input );
@@ -235,7 +247,7 @@
236248 $version = "trunk (r$versionNumber)";
237249 }
238250
239 -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude );
 251+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude_patterns );
240252 $command = $doxygenBin . ' ' . $generatedConf;
241253
242254 echo <<<TEXT
Index: trunk/phase3/maintenance/Doxyfile
@@ -134,9 +134,9 @@
135135 *.MM \
136136 *.PY
137137 RECURSIVE = YES
138 -EXCLUDE =
 138+EXCLUDE = {{EXCLUDE}}
139139 EXCLUDE_SYMLINKS = YES
140 -EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE}}
 140+EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}}
141141 EXAMPLE_PATH =
142142 EXAMPLE_PATTERNS = *
143143 EXAMPLE_RECURSIVE = NO

Follow-up revisions

RevisionCommit summaryAuthorDate
r81787Follow up r81562platonides22:33, 8 February 2011

Status & tagging log