-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
50 lines (44 loc) · 1.47 KB
/
phpstan.neon.dist
File metadata and controls
50 lines (44 loc) · 1.47 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
# 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 base configuration file for using PHPStan with the WordPress core 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.php # level 0.
- 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:
# https://phpstan.org/user-guide/rule-levels
level: 6
reportUnmatchedIgnoredErrors: true
ignoreErrors:
# Level 0:
- # Inner functions aren't 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.*#'