Skip to content

Commit

Permalink
phpmd.xml added for mess detection rules
Browse files Browse the repository at this point in the history
  • Loading branch information
MWest2020 committed Aug 5, 2024
1 parent dceba4d commit b62b7b9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/CI-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
continue-on-error: ${{ github.ref != 'refs/heads/main' }}

- name: Run phpmd
run: phpmd src text phpmd.xml --not-strict
run: phpmd src xml phpmd.xml --not-strict
continue-on-error: ${{ github.ref != 'refs/heads/main' }}

- name: Install Composer dependencies
Expand Down
25 changes: 25 additions & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<ruleset name="MyProject Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0
http://pmd.sourceforge.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sourceforge.net/ruleset_xml_schema.xsd">

<description>
This is a custom ruleset for OpenCatalogi Nextcloud.
</description>

<!-- Add the rules you want to use here -->
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/naming.xml"/>
<rule ref="rulesets/cleancode.xml"/>
<rule ref="rulesets/codesize.xml"/>
<rule ref="rulesets/controversial.xml"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>
<rule ref="rulesets/codesize.xml/TooManyFields"/>
<rule ref="rulesets/codesize.xml/TooManyMethods"/>
</ruleset>

0 comments on commit b62b7b9

Please sign in to comment.