Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 35 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | * http://www.gnu.org/copyleft/gpl.html |
17 | * |
18 | * @file |
19 | */ |
20 | |
21 | use MediaWikiPhanConfig\ConfigBuilder; |
22 | |
23 | require_once __DIR__ . '/base-config-functions.php'; |
24 | |
25 | // Replace \\ by / for windows users to let exclude work correctly |
26 | $DIR = str_replace( '\\', '/', __DIR__ ); |
27 | |
28 | $baseCfg = new ConfigBuilder(); |
29 | setBaseOptions( $DIR, $baseCfg ); |
30 | |
31 | $baseCfg |
32 | ->setDirectoryList( filterDirs( [ |
33 | 'includes/', |
34 | 'src/', |
35 | '.phan/stubs/', |
36 | 'vendor/', |
37 | ] ) ) |
38 | ->setExcludedDirectoryList( [ |
39 | '.phan/stubs/', |
40 | 'vendor/', |
41 | ] ) |
42 | ->setSuppressedIssuesList( [ |
43 | // Covered by codesniffer |
44 | 'PhanUnreferencedUseNormal', |
45 | 'PhanUnreferencedUseFunction', |
46 | 'PhanUnreferencedUseConstant', |
47 | 'PhanDuplicateUseNormal', |
48 | 'PhanDuplicateUseFunction', |
49 | 'PhanDuplicateUseConstant', |
50 | 'PhanUseNormalNoEffect', |
51 | 'PhanUseNormalNamespacedNoEffect', |
52 | 'PhanUseFunctionNoEffect', |
53 | 'PhanUseConstantNoEffect', |
54 | 'PhanDeprecatedCaseInsensitiveDefine', |
55 | 'PhanDeprecatedImplicitNullableParam', |
56 | |
57 | // These are quite PHP8-specific |
58 | 'PhanParamNameIndicatingUnused', |
59 | 'PhanParamNameIndicatingUnusedInClosure', |
60 | 'PhanProvidingUnusedParameter', |
61 | |
62 | // Would probably have many false positives |
63 | 'PhanPluginMixedKeyNoKey', |
64 | ] ) |
65 | ->enableTaintCheck( $DIR, 'vendor/' ); |
66 | |
67 | // BC: We're not ready to use the ConfigBuilder everywhere |
68 | return $baseCfg->make(); |