Phan/local-config.php
< Phan
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
1 <?php
2 // DO analyze every extension
3 $cfg['directory_list'] = array_merge(
4 $cfg['directory_list'],
5 [
6 'extensions/AbuseFilter',
7 'extensions/Arrays',
8 'extensions/CategoryTree',
9 # 'extensions/CiteThisPage',
10 # 'extensions/CollapsibleVector',
11 # 'extensions/ConfirmEdit',
12 # 'extensions/ContributionScores',
13 # 'extensions/CreateUserPage',
14 # 'extensions/CSS',
15 # 'extensions/DataTransfer',
16 # 'extensions/DeleteBatch',
17 # 'extensions/DisplayTitle',
18 # 'extensions/FlexDiagrams',
19 # 'extensions/Gadgets',
20 # 'extensions/HeaderFooter',
21 # 'extensions/HeaderTabs',
22 # 'extensions/Html5mediator',
23 # 'extensions/Maps',
24 # 'extensions/Math',
25 # 'extensions/MediaFunctions',
26 # 'extensions/Mermaid',
27 # 'extensions/ModernTimeline',
28 # 'extensions/Network',
29 # 'extensions/Nuke',
30 # 'extensions/NumerAlpha',
31 # 'extensions/OATHAuth',
32 # 'extensions/OpenLayers',
33 # 'extensions/PdfHandler',
34 # 'extensions/PipeEscape',
35 # 'extensions/Poem',
36 # 'extensions/Renameuser',
37 # 'extensions/SecureLinkFixer',
38 # 'extensions/SemanticCompoundQueries',
39 # 'extensions/SemanticDependencyUpdater',
40 # 'extensions/SemanticDrilldown',
41 # 'extensions/SemanticExtraSpecialProperties',
42 # 'extensions/SemanticMediaWiki',
43 # 'extensions/SemanticResultFormats',
44 # 'extensions/SemanticScribunto',
45 # 'extensions/SimpleBatchUpload',
46 # 'extensions/SimpleMathJax',
47 # 'extensions/SpamBlacklist',
48 # 'extensions/SubpageFun',
49 # 'extensions/SubPageList',
50 # 'extensions/TalkRight',
51 # 'extensions/TitleBlacklist',
52 # 'extensions/Validator',
53 # 'extensions/VEForAll',
54 # 'extensions/WatchAnalytics',
55 # 'extensions/WhitelistPages',
56 # 'extensions/WhoIsWatching',
57 # 'extensions/WhosOnline',
58 # 'extensions/Widgets',
59 # 'extensions/Wiretap',
60 # 'extensions/YouTube',
61 ## 'extensions/',
62 ]
63 );
64
65 // Do NOT analyze all the regular 'core' directories
66 $cfg['exclude_analysis_directory_list'] = array_merge(
67 $cfg['exclude_analysis_directory_list'],
68 [
69 'includes/',
70 'languages/',
71 'maintenance/',
72 'mw-config/',
73 'resources/',
74 'vendor/',
75 'tests/common/',
76 'tests/parser/',
77 'tests/phpunit/mocks/',
78 ]
79 );
80 ## To get a picture of the full configuration, just print it and exit.
81 # print_r( $cfg ); exit();