X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphan%2Fconfig.php;h=c561f8174ac6327c5dc2e284815d040193949651;hb=830a60aa827cdb44af17452e6b82e1065e00d8ad;hp=903d7cb707a5b8fc64e32bd6ae2fcedbf9d33460;hpb=8e337da65b111ddbcd63beef6440e9c1cdbe7b69;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phan/config.php b/tests/phan/config.php index 903d7cb707..c561f8174a 100644 --- a/tests/phan/config.php +++ b/tests/phan/config.php @@ -34,19 +34,26 @@ return [ * project. directory_list won't find .inc files so * we augment it here. */ - 'file_list' => [ - 'maintenance/7zip.inc', - 'maintenance/backupPrefetch.inc', - 'maintenance/commandLine.inc', - 'maintenance/sqlite.inc', - 'maintenance/userOptions.inc', - 'maintenance/backup.inc', - 'maintenance/cleanupTable.inc', - 'maintenance/importImages.inc', - 'maintenance/userDupes.inc', - 'maintenance/language/checkLanguage.inc', - 'maintenance/language/languages.inc', - ], + 'file_list' => array_merge( + function_exists( 'register_postsend_function' ) ? [] : [ 'tests/phan/stubs/hhvm.php' ], + function_exists( 'wikidiff2_do_diff' ) ? [] : [ 'tests/phan/stubs/wikidiff.php' ], + function_exists( 'tideways_enable' ) ? [] : [ 'tests/phan/stubs/tideways.php' ], + class_exists( PEAR::class ) ? [] : [ 'tests/phan/stubs/mail.php' ], + class_exists( Memcached::class ) ? [] : [ 'tests/phan/stubs/memcached.php' ], + [ + 'maintenance/7zip.inc', + 'maintenance/backupPrefetch.inc', + 'maintenance/commandLine.inc', + 'maintenance/sqlite.inc', + 'maintenance/userOptions.inc', + 'maintenance/backup.inc', + 'maintenance/cleanupTable.inc', + 'maintenance/importImages.inc', + 'maintenance/userDupes.inc', + 'maintenance/language/checkLanguage.inc', + 'maintenance/language/languages.inc', + ] + ), /** * A list of directories that should be parsed for class and @@ -65,7 +72,6 @@ return [ 'resources/', 'skins/', 'vendor/', - 'tests/phan/stubs/', ], /** @@ -75,10 +81,7 @@ return [ * This is useful for excluding hopelessly unanalyzable * files that can't be removed for whatever reason. */ - 'exclude_file_list' => function_exists( 'xcache_get' ) ? [] : [ - // References xcache which probably isn't installed - 'includes/libs/objectcache/XCacheBagOStuff.php' - ], + 'exclude_file_list' => [], /** * A list of directories holding code that we want @@ -96,7 +99,7 @@ return [ // External class 'includes/libs/jsminplus.php', // separate repositories - 'skins/' + 'skins/', ], /** @@ -129,7 +132,7 @@ return [ * ```php * true, - // Emit all issues. They are then supressed via + // Emit all issues. They are then suppressed via // suppress_issue_types, rather than a minimum // severity. "minimum_severity" => 0, @@ -203,7 +206,7 @@ return [ * with complicated cross-file globals that you have no * hope of fixing. */ - 'ignore_undeclared_variables_in_global_scope' => false, + 'ignore_undeclared_variables_in_global_scope' => true, /** * Set to true in order to attempt to detect dead @@ -339,8 +342,6 @@ return [ "PhanUndeclaredProperty", // approximate error count: 3 "PhanUndeclaredStaticMethod", - // approximate error count: 79 - "PhanUndeclaredVariable", ], /**