我了解如何使用 xml 配置 phpcs,但找不到我如何禁用一些嗅探。这是我当前的配置(甚至不知道这是否正确):
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="custom"
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">
<rule ref="rulesets/codesize.xml"/>
<rule ref="rulesets/controversial.xml/Superglobals"/>
<rule ref="rulesets/controversial.xml/CamelCaseParameterName"/>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName"/>
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/naming.xml/ShortMethodName"/>
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/>
<rule ref="rulesets/naming.xml/BooleanGetMethodName">
<properties>
<property name="checkParameterizedMethods" value="true"/>
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml"/>
<arg name="tab-width" value="2"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="140"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
</ruleset>
我想禁用这些:
[phpcs] @copyright tag must contain a year and the name of the copyright holder
所有文档评论嗅探(我不需要它们)[phpcs] PHP version not specified
[phpcs] There must be exactly one blank line before the tags in a doc comment
[phpcs] The open comment tag must be the only content on the line
[phpcs] Missing short description in doc comment
[phpcs] The close comment tag must be the only content on the line
[phpcs] Line indented incorrectly; expected at least 4 spaces, found 2
我用了两个空格![phpcs] Missing file doc comment
[phpcs] Line exceeds 85 characters; contains 91 characters
我希望最多 140
如果我想添加更多,我在哪里可以搜索可能的配置?