False Positive - Web:AvoidCommentedOutCodeCheck with JSF @elvariable with SonarLint

Using SonarLint in Intellij IDEA 2021.3.1

Issue I’m running into is the following lines, which are generated by Intellij as an annotation to mark variables used in the JSF/XHTML template file and their types.

<!--@elvariable id="id" type="java.lang.String"-->
<!--@elvariable id="label" type="java.lang.String"-->
<!--@elvariable id="required" type="java.lang.Boolean"-->

It’s actually identical in usage as this post I found for Thymeleaf: https://community.sonarsource.com/t/false-positive-web-avoidcommentedoutcodecheck-in-thymeleaf-template/48716

Hello Jason!

Welcome to the community and thank you for this report! :slight_smile:

Indeed you are right, we should not raise an issue in this case. I created a ticket to track this problem.

Keep’em coming. :wink: