-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
default-config.neon
199 lines (176 loc) · 6.25 KB
/
default-config.neon
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# rexstan default configuration file - do not edit, delete, rename.
# these settings might be overwritten via user-config.neon
includes:
- vendor/spaze/phpstan-disallowed-calls/extension.neon
- vendor/staabm/phpstan-todo-by/extension.neon
# required for dead-code.neon, code-complexity.neon, native-type-coverage.neon
- vendor/symplify/phpstan-rules/config/services/services.neon
parameters:
level: 5
excludePaths:
- '*/vendor/*'
- '*/node_modules/*'
disallowedMethodCalls:
-
method: 'rex_sql::beginTransaction()'
message: 'handling transactions manually is error prone.'
errorTip: 'Prefer using rex_sql::transactional() instead.'
todo_by:
nonIgnorable: true
# any strtotime() compatible string
referenceTime: "now+7days"
# "nextMajor", "nextMinor", "nextPatch" or a version string like "1.2.3"
referenceVersion: "nextMinor"
# whether all files beeing analyzed are contained in the same git repository.
# If set to false, the git tags are fetched for each directory individually (slower)
singleGitRepo: false
ticket:
enabled: true
tracker: github
ignoreErrors:
# ignore errors when analyzing rex modules/templates, caused by rex-vars
-
message: '#does not handle remaining value:.+REX_[A-Z_]+.*#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#does not handle remaining value:.+REX_[A-Z_]+.*#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#does not handle remaining value:.+REX_[A-Z_]+.*#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#does not handle remaining value:.+REX_[A-Z_]+.*#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#.+REX_[A-Z_]+.*results in an error\.#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#.+REX_[A-Z_]+.*results in an error\.#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#.+REX_[A-Z_]+.*results in an error\.#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#.+REX_[A-Z_]+.*results in an error\.#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#Constant REX_[A-Z_]+ not found\.#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#Constant REX_[A-Z_]+ not found\.#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#Constant REX_[A-Z_]+ not found\.#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#Constant REX_[A-Z_]+ not found\.#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#.* will always evaluate to (true|false).#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#.* will always evaluate to (true|false).#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#.* will always evaluate to (true|false).#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#.* will always evaluate to (true|false).#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#.* is always (true|false).#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#.* is always (true|false).#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#.* is always (true|false).#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#.* is always (true|false).#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#^Variable \$this might not be defined\.#'
path: '*data/addons/developer/*'
reportUnmatched: false
-
message: '#^Variable \$this might not be defined\.#'
path: '*/theme/*'
reportUnmatched: false
-
message: '#^Variable \$this might not be defined\.#'
path: '*/src/templates/*'
reportUnmatched: false
-
message: '#^Variable \$this might not be defined\.#'
path: '*/src/modules/*'
reportUnmatched: false
-
message: '#^Variable \$this might not be defined\.#'
path: '*/fragments/*'
reportUnmatched: false
-
message: '#^Switch condition type \(''REX_VALUE\[.*\]''\) does not match case condition .* \(string\)\.$#'
reportUnmatched: false
# autoload core symbols which are not autoloadable
scanDirectories:
- ../../core/functions/
bootstrapFiles:
- phpstan-bootstrap.php
# https://phpstan.org/config-reference#universal-object-crates
universalObjectCratesClasses:
- rex_fragment
services:
-
class: rexstan\RexClassDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
-
class: rexstan\RexFunctionsDynamicReturnTypeExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
-
class: rexstan\RexModuleInputVarsCollector
tags:
- phpstan.collector
-
class: rexstan\RexModuleOutputVarsCollector
tags:
- phpstan.collector
-
class: rexstan\RexModuleVarsRule
tags:
- phpstan.rules.rule
-
class: rexstan\RexTemplateVarsCollector
tags:
- phpstan.collector
-
class: rexstan\RexTemplateVarsRule
tags:
- phpstan.rules.rule
-
class: rexstan\YOrmDatasetOptionalTableRule
tags:
- phpstan.rules.rule