Question

I have the following code in an xhtml file :

    <span class="ui-messages-info-icon"></span><br />
    <!-- Le positinnement de escape="false" permet la prise en compte des balises HTML dans le message (notamment les br). -->
    <h:outputText value="#detailExceptionMessage" escape="false"/>

When I run an analyse : a new violation with the AvoidCommentedOutCodeCheck rule is raised. I think this violation must not appear because it is not a commented code but a comment with a piece of example code ;) !

Is it a bug, a false-positive to flag or a bad configuration of my rule ?

Regards,

Stef

Était-ce utile?

La solution

The spec on this feature says the rule should find "unused code".

Your commented line is not code (markup in that case) that can be activated by uncommenting, but really documentation. So this would be a false positive.

Also: Check out the unittest and corresponding testfile on github to see what the rule is tested against right now.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top