Skip to content

Commit eb31539

Browse files
author
Volodymyr Kublytskyi
committed
MAGETWO-64523: Add static test on forbidden "final" keyword and eliminate it usage in code
- included Magento specific PHPMD rules into static test suite
1 parent c51ebae commit eb31539

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

dev/tests/static/framework/autoload.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
$testsBaseDir . '/../integration/framework/Magento/TestFramework/',
1919
]
2020
);
21+
$autoloadWrapper->addPsr4('Magento\\MessDetector\\', $testsBaseDir . '/framework/Magento/MessDetector/src');
2122

2223
$generatedCode = DirectoryList::getDefaultConfig()[DirectoryList::GENERATED_CODE][DirectoryList::PATH];
2324
$autoloadWrapper->addPsr4('Magento\\', $baseDir . '/' . $generatedCode . '/Magento/');

dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
1111
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
1212
<description>Magento Code Check Rules</description>
13+
<php-includepath>../../../../../../framework</php-includepath>
1314

1415
<!-- Code Size Rules -->
1516
<rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
@@ -43,4 +44,8 @@
4344
<rule ref="rulesets/naming.xml/ShortMethodName" />
4445
<rule ref="rulesets/naming.xml/ConstantNamingConventions" />
4546
<rule ref="rulesets/naming.xml/BooleanGetMethodName" />
47+
48+
<!-- Magento Specific Rules -->
49+
<rule ref="Magento/MessDetector/resources/rulesets/design.xml/FinalImplementation" />
50+
4651
</ruleset>

0 commit comments

Comments
 (0)