summaryrefslogtreecommitdiffstats
path: root/build/.phan/config.php
blob: 47bcb87acdd5cb7eaef014a05b4811b3308754f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php
/**
 * This configuration will be read and overlaid on top of the
 * default configuration. Command line arguments will be applied
 * after this file is read.
 *
 * @see src/Phan/Config.php
 * See Config for all configurable options.
 */
return [
	// A list of directories that should be parsed for class and
	// method information. After excluding the directories
	// defined in exclude_analysis_directory_list, the remaining
	// files will be statically analyzed for errors.
	//
	// Thus, both first-party and third-party code being used by
	// your application should be included in this list.
	'directory_list' => [
		'build/.phan/stubs',
		'3rdparty',
		'lib/composer',
		'themes',
		'lib/',
		'apps/',
		'core/',
		'ocs/',
		'ocs-provider/',
		'settings/',
		'tests/lib/Util/User',
	],

	// A directory list that defines files that will be excluded
	// from static analysis, but whose class and method
	// information should be included.
	//
	// Generally, you'll want to include the directories for
	// third-party code (such as "vendor/") in this list.
	//
	// n.b.: If you'd like to parse but not analyze 3rd
	//       party code, directories containing that code
	//       should be added to the `directory_list` as
	//       to `exclude_analysis_directory_list`.
	"exclude_analysis_directory_list" => [
		'3rdparty',
		'lib/composer',
		'apps/admin_audit/composer',
		'apps/admin_audit/tests',
		'apps/comments/composer',
		'apps/comments/tests',
		'apps/dav/composer',
		'apps/dav/tests',
		'apps/encryption/composer',
		'apps/encryption/tests',
		'apps/federatedfilesharing/composer',
		'apps/federatedfilesharing/tests',
		'apps/federation/composer',
		'apps/federation/tests',
		'apps/files/composer',
		'apps/files/tests',
		'apps/files_external/3rdparty',
		'apps/files_external/composer',
		'apps/files_external/tests',
		'apps/files_sharing/composer',
		'apps/files_sharing/tests',
		'apps/files_trashbin/composer',
		'apps/files_trashbin/tests',
		'apps/files_versions/composer',
		'apps/files_versions/tests',
		'apps/lookup_server_connector/composer',
		'apps/lookup_server_connector/tests',
		'apps/oauth2/composer',
		'apps/oauth2/tests',
		'apps/provisioning_api/composer',
		'apps/provisioning_api/tests',
		'apps/sharebymail/composer',
		'apps/sharebymail/tests',
		'apps/systemtags/composer',
		'apps/systemtags/tests',
		'apps/testing/composer',
		'apps/testing/tests',
		'apps/theming/composer',
		'apps/theming/tests',
		'apps/twofactor_backupcodes/composer',
		'apps/twofactor_backupcodes/tests',
		'apps/updatenotification/composer',
		'apps/updatenotification/tests',
		'apps/user_ldap/composer',
		'apps/user_ldap/tests',
		'apps/workflowengine/composer',
		'apps/workflowengine/tests',
	],

	// The number of processes to fork off during the analysis
	// phase.
	'processes' => 10,

	// Backwards Compatibility Checking. This is slow
	// and expensive, but you should consider running
	// it before upgrading your version of PHP to a
	// new version that has backward compatibility
	// breaks.
	'backward_compatibility_checks' => false,

	// Run a quick version of checks that takes less
	// time at the cost of not running as thorough
	// an analysis. You should consider setting this
	// to true only when you wish you had more issues
	// to fix in your code base.
	'quick_mode' => true,

	// If enabled, check all methods that override a
	// parent method to make sure its signature is
	// compatible with the parent's. This check
	// can add quite a bit of time to the analysis.
	'analyze_signature_compatibility' => false,

	// The minimum severity level to report on. This can be
	// set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or
	// Issue::SEVERITY_CRITICAL. Setting it to only
	// critical issues is a good place to start on a big
	// sloppy mature code base.
	'minimum_severity' => 10,

	// If true, missing properties will be created when
	// they are first seen. If false, we'll report an
	// error message if there is an attempt to write
	// to a class property that wasn't explicitly
	// defined.
	'allow_missing_properties' => true,

	// Allow null to be cast as any type and for any
	// type to be cast to null. Setting this to false
	// will cut down on false positives.
	'null_casts_as_any_type' => true,

	// Allow null to be cast as any array-like type (Requires 0.9.3+)
	// This is an incremental step in migrating away from null_casts_as_any_type.
	// If null_casts_as_any_type is true, this has no effect.
	'null_casts_as_array' => false,

	// Allow any array-like type to be cast to null. (Requires 0.9.3+)
	// This is an incremental step in migrating away from null_casts_as_any_type.
	// If null_casts_as_any_type is true, this has no effect.
	'array_casts_as_null' => false,

	// If enabled, scalars (int, float, bool, true, false, string, null)
	// are treated as if they can cast to each other.
	'scalar_implicit_cast' => true,

	// If this has entries, scalars (int, float, bool, true, false, string, null)
	// are allowed to perform the casts listed.
	// E.g. ['int' => ['float', 'string'], 'float' => ['int'], 'string' => ['int'], 'null' => ['string']]
	// allows casting null to a string, but not vice versa.
	// (subset of scalar_implicit_cast)
	// (Requires 0.9.3+)
	'scalar_implicit_partial' => [],

	// If true, seemingly undeclared variables in the global
	// scope will be ignored. This is useful for projects
	// with complicated cross-file globals that you have no
	// hope of fixing.
	'ignore_undeclared_variables_in_global_scope' => true,

	// Add any issue types (such as 'PhanUndeclaredMethod')
	// to this black-list to inhibit them from being reported.
	'suppress_issue_types' => [
		// 'PhanUndeclaredMethod',
	],

	// If empty, no filter against issues types will be applied.
	// If this white-list is non-empty, only issues within the list
	// will be emitted by Phan.
	'whitelist_issue_types' => [
		// 'PhanAccessMethodPrivate',
	],

	// A list of plugin files to execute
	'plugins' => [
		'build/.phan/plugins/SqlInjectionCheckerPlugin.php',
	],
];