Commit 9793c0d
committed
refactor(ci): align phpmd ruleset with Magento core static tests
Replace the broad all-rulesets config with the specific rules Magento
select in dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml.
Removed:
- cleancode.xml entirely (Magento don't use it; contained ElseExpression)
- Full naming.xml (replaced with 3 targeted rules; LongVariable not included)
- Full design.xml (replaced with NumberOfChildren, DepthOfInheritance, CouplingBetweenObjects)
- Full codesize.xml (replaced with 7 specific rules matching Magento's selection)
Added:
- unusedcode.xml excluding UnusedFormalParameter (Magento use a custom
version of this rule that understands plugin signatures, enforced by
the Magento instance's own static test suite)
- ExcessiveClassComplexity with maximum=100 (Magento's threshold)
- DepthOfInheritance with minimum=8 (accommodates Magento's inheritance depth)
Result: 0 violations, aligned with Magento's own enforcement standard.1 parent d5657d6 commit 9793c0d
1 file changed
+46
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
2 | 17 | | |
3 | 18 | | |
4 | 19 | | |
5 | 20 | | |
6 | 21 | | |
7 | 22 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 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 | + | |
13 | 50 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
19 | 55 | | |
0 commit comments