firefly-iii/.ci/phpmd/phpmd.xml

79 lines
2.9 KiB
XML
Raw Normal View History

2023-06-21 05:34:58 -05:00
<?xml version="1.0" encoding="UTF-8"?>
2023-07-15 09:02:42 -05:00
<!--
~ phpmd.xml
~ Copyright (c) 2023 james@firefly-iii.org
~
~ This file is part of Firefly III (https://github.com/firefly-iii).
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<ruleset name="pcsg-generated-ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2023-06-21 05:34:58 -05:00
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>Bla bla</description>
2023-07-15 09:02:42 -05:00
<!--
Commando vanuit firefly directory:
2023-06-21 05:34:58 -05:00
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
-->
<!-- Import the entire controversial code rule set -->
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCasePropertyName" />
</rule>
2023-07-15 09:02:42 -05:00
2023-06-21 05:34:58 -05:00
<!-- clean code -->
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
<properties>
2023-11-05 02:54:53 -06:00
<!-- TODO we want to be at report level 5. But we start high, and drop the bar slowly. -->
<property name="reportLevel" value="500"/>
2023-06-21 05:34:58 -05:00
</properties>
</rule>
<rule ref="rulesets/codesize.xml/NPathComplexity">
<properties>
2023-11-05 02:54:53 -06:00
<!-- TODO we want to be at a value of 128. But we start high, and drop the bar slowly. -->
<property name="minimum" value="2048"/>
2023-06-21 05:34:58 -05:00
</properties>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<properties>
2023-11-05 02:54:53 -06:00
<!-- TODO we want to be at a value of 40. But we start high, and drop the bar slowly. -->
<property name="minimum" value="400"/>
2023-06-21 05:34:58 -05:00
</properties>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
<properties>
2023-11-05 02:54:53 -06:00
<!-- TODO we want to be at a value of 4. But we start high, and drop the bar slowly. -->
2023-06-21 05:34:58 -05:00
<property name="minimum" value="5"/>
</properties>
</rule>
<!-- include clean code manually -->
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />
<rule ref="rulesets/cleancode.xml/ElseExpression" />
2023-11-04 08:09:51 -05:00
<rule ref="rulesets/cleancode.xml/MissingImport" />
<rule ref="rulesets/cleancode.xml/UndefinedVariable" />
2023-06-21 05:34:58 -05:00
<!-- no this one -->
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
2023-07-15 09:02:42 -05:00
</ruleset>