The default was previously to index all of core and extensions,
which is likely not the intent of someone running this for the
first time (which can then easily take over half an hour).
Even in CI, we never do this, and we never have afaik.
Generally, local use is to replicate CI (all of core), or a subset
of core by passing e.g. '--file includes/libs' or some such.
Indexing an extension is still possible, same way as before,
by passing '--file extensions/FooBar'. And, if one really wants
to index all of core and all extensions, the new '--extensions'
option allows one to opt back in to the old behaviour.
Also:
* Exclude all of 'resources/'. There are no PHP or Markdown files
here that need to be indexed.
Bug: T232104
Change-Id: I55617776ac86f3fdcb6c1ba1eebe892edcb5fafb
$this->addOption( 'output',
'Path to write doc to',
false, true );
$this->addOption( 'output',
'Path to write doc to',
false, true );
- $this->addOption( 'no-extensions',
- 'Ignore extensions' );
+ $this->addOption( 'extensions',
+ 'Process the extensions/ directory as well (ignored if --file is used)' );
+ $this->addOption( 'skins',
+ 'Process the skins/ directory as well (ignored if --file is used)' );
}
public function getDbType() {
}
public function getDbType() {
$this->template = $IP . '/maintenance/Doxyfile';
$this->excludes = [
$this->template = $IP . '/maintenance/Doxyfile';
$this->excludes = [
- 'vendor',
- 'node_modules',
- 'resources/lib',
+ 'node_modules',
+ 'resources',
- 'resources/src/mediawiki.ui/styleguide.md',
];
$this->excludePatterns = [];
];
$this->excludePatterns = [];
- if ( $this->hasOption( 'no-extensions' ) ) {
- $this->excludePatterns[] = 'extensions';
- $this->excludePatterns[] = 'skins';
+ if ( $this->input === '' ) {
+ // If no explicit --file filter is set, we're indexing all of $IP,
+ // but any extension or skin submodules should be excluded by default.
+ if ( !$this->hasOption( 'extensions' ) ) {
+ $this->excludePatterns[] = 'extensions';
+ }
+ if ( !$this->hasOption( 'skins' ) ) {
+ $this->excludePatterns[] = 'skins';
+ }
}
$this->doDot = shell_exec( 'which dot' );
}
$this->doDot = shell_exec( 'which dot' );