Skip to content

Files

Latest commit

 

History

History
24 lines (16 loc) · 943 Bytes

Squiz.PHP.CommentedOutCode.md

File metadata and controls

24 lines (16 loc) · 943 Bytes

Pattern: Commented out code

Issue: -

Description

Warns about commented out code.

Configuration

By default, a warning is generated if a comment appears to be more than 35% valid code. If you find that the rule is generating a lot of false positives, you may want to raise the valid code threshold by increasing the maxPercentage property. Similarly, if you find that the rule is generating a lot of false negatives, you may want to make it more sensitive by dropping the threshold by decreasing the maxPercentage property.

<!-- Make this rule more sensitive to commented out code blocks. -->
<rule ref="Squiz.PHP.CommentedOutCode">
    <properties>
        <property name="maxPercentage" value="20" />
    </properties>
</rule>

Further Reading