문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top