Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit a4e2afb

Browse files
committed
phan static analyzer config
1 parent 7a3dbea commit a4e2afb

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.phan/config.php

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?php
2+
3+
/**
4+
* This configuration will be read and overlaid on top of the
5+
* default configuration. Command line arguments will be applied
6+
* after this file is read.
7+
*/
8+
return [
9+
10+
// Run a quick version of checks that takes less
11+
// time at the cost of not running as thorough
12+
// an analysis. You should consider setting this
13+
// to true only when you wish you had more issues
14+
// to fix in your code base.
15+
'quick_mode' => true,
16+
17+
// If enabled, check all methods that override a
18+
// parent method to make sure its signature is
19+
// compatible with the parent's. This check
20+
// can add quite a bit of time to the analysis.
21+
'analyze_signature_compatibility' => true,
22+
23+
// Backwards Compatibility Checking. This is slow
24+
// and expensive, but you should consider running
25+
// it before upgrading your version of PHP to a
26+
// new version that has backward compatibility
27+
// breaks.
28+
'backward_compatibility_checks' => true,
29+
30+
// By default, Phan will not analyze all node types
31+
// in order to save time. If this config is set to true,
32+
// Phan will dig deeper into the AST tree and do an
33+
// analysis on all nodes, possibly finding more issues.
34+
'should_visit_all_nodes' => true,
35+
36+
// If empty, no filter against issues types will be applied.
37+
// If this white-list is non-empty, only issues within the list
38+
// will be emitted by Phan.
39+
'whitelist_issue_types' => [
40+
'PhanCompatiblePHP7'
41+
],
42+
43+
// A list of directories that should be parsed for class and
44+
// method information. After excluding the directories
45+
// defined in exclude_analysis_directory_list, the remaining
46+
// files will be statically analyzed for errors.
47+
//
48+
// Thus, both first-party and third-party code being used by
49+
// your application should be included in this list.
50+
'directory_list' => [
51+
'core/src/core',
52+
'core/src/conf',
53+
'core/src/plugins'
54+
],
55+
56+
// A directory list that defines files that will be excluded
57+
// from static analysis, but whose class and method
58+
// information should be included.
59+
//
60+
// Generally, you'll want to include the directories for
61+
// third-party code (such as "vendor/") in this list.
62+
//
63+
// n.b.: If you'd like to parse but not analyze 3rd
64+
// party code, directories containing that code
65+
// should be added to the `directory_list` as
66+
// to `excluce_analysis_directory_list`.
67+
"exclude_analysis_directory_list" => [
68+
'core/src/core/vendor/',
69+
'core/src/plugins/access.ajxp_conf/vendor/',
70+
'core/src/plugins/access.dropbox/vendor/',
71+
'core/src/plugins/access.webdav/vendor/',
72+
'core/src/plugins/action.scheduler/vendor/',
73+
'core/src/plugins/action.share/vendor/',
74+
'core/src/plugins/auth.ldapv2/vendor/',
75+
'core/src/plugins/cache.doctrine/vendor/',
76+
'core/src/plugins/core.access/vendor/',
77+
'core/src/plugins/core.mq/vendor/',
78+
'core/src/plugins/core.ocs/vendor/',
79+
'core/src/plugins/core.tasks/vendor/',
80+
'core/src/plugins/index.elasticsearch/vendor/',
81+
'core/src/plugins/meta.git/vendor/',
82+
'core/src/plugins/access.swift/openstack-sdk-php/'
83+
],
84+
];

0 commit comments

Comments
 (0)