Skip to content

Commit

Permalink
Add files for phpcs/md/stan
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott committed Apr 25, 2024
1 parent dd4f28b commit d3e2f7d
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/oxid-esales/composer-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ install_shop_with_modules:
transform: |
{
"require-dev": {
"phpstan/phpstan": "^1.9.14",
"phpmd/phpmd": "^2.11",
"phpstan/phpstan": "^1.9.14",
"phpmd/phpmd": "^2.11",
}
}
Expand Down
27 changes: 27 additions & 0 deletions tests/PhpMd/standard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<ruleset name="Standard PHPMD rule set for Oxid"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Standard OXID Ruleset
</description>

<rule ref="rulesets/cleancode.xml/StaticAccess">
<properties>
<property name="exceptions">
<value>
\Symfony\Component\Filesystem\Path
</value>
</property>
</properties>
</rule>

<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
</ruleset>
3 changes: 3 additions & 0 deletions tests/PhpStan/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parameters:
checkMissingIterableValueType: false
level: 8
38 changes: 38 additions & 0 deletions tests/phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0"?>
<ruleset name="Oxid Coding Standard">
<description>Oxid Coding Standard</description>

<!-- Paths to check -->
<file>../src/</file>
<file>./</file>
<!--
<file>../translations</file>
-->
<file>../migration</file>
<exclude-pattern>./tests/Codeception/Config</exclude-pattern>

<!-- display progress -->
<arg value="p"/>
<arg name="colors"/>
<arg name="extensions" value="php,dist,phtml"/>

<!-- inherit rules from: -->
<rule ref="PSR12"/>

<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>

<!-- ignore method declaration rules for tests -->
<rule ref="PSR2.Methods.MethodDeclaration">
<exclude-pattern>./</exclude-pattern>
</rule>

<!-- ignore property declaration rules for tests -->
<rule ref="PSR2.Classes.PropertyDeclaration">
<exclude-pattern>./</exclude-pattern>
</rule>
</ruleset>

0 comments on commit d3e2f7d

Please sign in to comment.