你能告诉我如何在 netbeans 8.1 中设置自定义 phpmd 规则集文件吗?

Will you please tell me how to set custom phpmd ruleset file in netbeans 8.1?

我正在将 phpmd 安装到 netbeans 中,它也给我错误,但是如果我想在 netbeans 8.1 中设置自定义规则集文件怎么办?

我得到了答案.....
使用 link
创建自定义标准文件后 把这个文件放到 [main][usr/share/data/PHPMD/resources/rulesets]
我使用 [bold][customPHPMD.xml]

制作文件自定义标准规则文件名

为此我在终端上写了一些命令

cd usr/share/data/PHPMD/resources/rulesets
sudo nano customPHPMD.xml
sudo chmod 777 cusomtPHPMD.xml

<?xml version="1.0"?>
<ruleset name="My first PHPMD rule set"
         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>
        My custom rule set that checks my code...
    </description>

    <!-- Import the entire unused code rule set -->
    <rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
    <rule ref="rulesets/codesize.xml/NPathComplexity" />
    <rule ref="rulesets/codesize.xml/ExcessiveMethodLength" />
    <rule ref="rulesets/codesize.xml/ExcessiveClassLength" />
    <rule ref="rulesets/codesize.xml/ExcessiveParameterList" />
    <rule ref="rulesets/codesize.xml/TooManyFields" />  
    <rule ref="rulesets/codesize.xml/TooManyMethods" /> 
    <rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" />   
    <rule ref="rulesets/controversial.xml/CamelCaseClassName" />
    <rule ref="rulesets/controversial.xml/CamelCasePropertyName" /> 
    <rule ref="rulesets/controversial.xml/CamelCaseMethodName" />           
    <rule ref="rulesets/controversial.xml/CamelCaseParameterName" />    
    <rule ref="rulesets/controversial.xml/ExitExpression" />    
    <rule ref="rulesets/design.xml/ExitExpression" />   
</ruleset>

在此之后右击项目->属性->phpcsmd