Commit c5728e4
committed
Ruleset: allow for extending pre-existing array values
As things were, using `extend="true"` when setting an array property in a ruleset XML file could only extend another array property setting set in an (included) ruleset file.
A potential default array value set on the sniff itself could not be extended.
This commit changes this behaviour.
If a default array value is defined on a sniff, setting additional array values via a ruleset with `extend="true"` will now add these values to the pre-existing sniff property default value.
This also now allows for redefining the array _value_ for a predefined associative key.
Includes plenty of tests documenting and safeguarding the feature.
Fixes 151 parent d931de4 commit c5728e4
File tree
4 files changed
+14
-0
lines changed- src
- tests/Core/Ruleset
- Fixtures/TestStandard/Sniffs/SetProperty
4 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
| 1672 | + | |
1672 | 1673 | | |
1673 | 1674 | | |
1674 | 1675 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
0 commit comments