forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
53 lines (47 loc) · 1.6 KB
/
phpstan.neon.dist
File metadata and controls
53 lines (47 loc) · 1.6 KB
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
# PHPStan configuration for WordPress Core.
#
# To overload this configuration, copy this file to phpstan.neon and adjust as needed.
#
# https://phpstan.org/config-reference
includes:
# The WordPress Core configuration file includes the base configuration for the WordPress codebase.
- tests/phpstan/base.neon
# The baseline file includes preexisting errors in the codebase that should be ignored.
# https://phpstan.org/user-guide/baseline
- tests/phpstan/baseline/level-1.php
- tests/phpstan/baseline/level-2.php
- tests/phpstan/baseline/level-3.php
- tests/phpstan/baseline/level-4.php
- tests/phpstan/baseline/level-5.php
- tests/phpstan/baseline/level-6.php
parameters:
level: 6
reportUnmatchedIgnoredErrors: true
ignoreErrors:
# Level 0:
- # Inner functions arent supported by PHPstan.
message: '#Function wxr_[a-z_]+ not found#'
path: src/wp-admin/includes/export.php
-
identifier: function.inner
path: src/wp-admin/includes/export.php
count: 13
-
identifier: function.inner
path: src/wp-admin/includes/file.php
count: 1
-
identifier: function.inner
path: src/wp-includes/canonical.php
count: 1
# Level 1:
- # These are too noisy at the moment.
message: '#Variable \$[a-zA-Z0-9_]+ might not be defined\.#'
# Level 2:
- # Callable-strings are used as callables in WordPress.
message: '#Default value of the parameter .* is incompatible with type callable.*#'
# Level 6:
- # WPCS syntax for iterable types is not supported.
identifier: missingType.iterableValue
- # Too noisy until `void` return types are allowed.
identifier: missingType.return