Difference between revisions of "Phan/local-config.php"
(Created page with "The distributed <code>.phan/config.php</code> file contains an include at the bottom for this file. So, if you create this file in your MediaWiki $IP (Install Path) at <code>....") |
|||
Line 3: | Line 3: | ||
This example purposely ignores all 'core' MediaWiki for analysis, and adds a long list of extensions for analysis. | This example purposely ignores all 'core' MediaWiki for analysis, and adds a long list of extensions for analysis. | ||
− | {{collapsible | + | {{collapsible |
|visible_text=This is a sample 'local' configuration for Phan | |visible_text=This is a sample 'local' configuration for Phan | ||
|collapsed_content= | |collapsed_content= | ||
− | <syntaxhighlight lang="php"> | + | <syntaxhighlight lang="php" line="1"> |
− | |||
// DO analyze every extension | // DO analyze every extension | ||
$cfg['directory_list'] = array_merge( | $cfg['directory_list'] = array_merge( |
Revision as of 23:28, 18 February 2024
The distributed .phan/config.php
file contains an include at the bottom for this file. So, if you create this file in your MediaWiki $IP (Install Path) at .phan/local-config.php
, then it will automatically be interpreted by phan when you run it on your MediaWiki codebase.
This example purposely ignores all 'core' MediaWiki for analysis, and adds a long list of extensions for analysis.
This is a sample 'local' configuration for Phan
// DO analyze every extension $cfg['directory_list'] = array_merge( $cfg['directory_list'], [ 'extensions/AbuseFilter', 'extensions/Arrays', 'extensions/CategoryTree',
- 'extensions/CiteThisPage',
- 'extensions/CollapsibleVector',
- 'extensions/ConfirmEdit',
- 'extensions/ContributionScores',
- 'extensions/CreateUserPage',
- 'extensions/CSS',
- 'extensions/DataTransfer',
- 'extensions/DeleteBatch',
- 'extensions/DisplayTitle',
- 'extensions/FlexDiagrams',
- 'extensions/Gadgets',
- 'extensions/HeaderFooter',
- 'extensions/HeaderTabs',
- 'extensions/Html5mediator',
- 'extensions/Maps',
- 'extensions/Math',
- 'extensions/MediaFunctions',
- 'extensions/Mermaid',
- 'extensions/ModernTimeline',
- 'extensions/Network',
- 'extensions/Nuke',
- 'extensions/NumerAlpha',
- 'extensions/OATHAuth',
- 'extensions/OpenLayers',
- 'extensions/PdfHandler',
- 'extensions/PipeEscape',
- 'extensions/Poem',
- 'extensions/Renameuser',
- 'extensions/SecureLinkFixer',
- 'extensions/SemanticCompoundQueries',
- 'extensions/SemanticDependencyUpdater',
- 'extensions/SemanticDrilldown',
- 'extensions/SemanticExtraSpecialProperties',
- 'extensions/SemanticMediaWiki',
- 'extensions/SemanticResultFormats',
- 'extensions/SemanticScribunto',
- 'extensions/SimpleBatchUpload',
- 'extensions/SimpleMathJax',
- 'extensions/SpamBlacklist',
- 'extensions/SubpageFun',
- 'extensions/SubPageList',
- 'extensions/TalkRight',
- 'extensions/TitleBlacklist',
- 'extensions/Validator',
- 'extensions/VEForAll',
- 'extensions/WatchAnalytics',
- 'extensions/WhitelistPages',
- 'extensions/WhoIsWatching',
- 'extensions/WhosOnline',
- 'extensions/Widgets',
- 'extensions/Wiretap',
- 'extensions/YouTube',
- 'extensions/',
] );
// Do NOT analyze all the regular 'core' directories $cfg['exclude_analysis_directory_list'] = array_merge( $cfg['exclude_analysis_directory_list'], [ 'includes/', 'languages/', 'maintenance/', 'mw-config/', 'resources/', 'vendor/', 'tests/common/', 'tests/parser/', 'tests/phpunit/mocks/', ] );
- To get a picture of the full configuration, just print it and exit.
- print_r( $cfg ); exit();