@elvariable detected as a comment in JSF .xhtml files

When using @elvariable, Sonar detects it as a simple comment, but it’s in fact an annotation used to specify the type of the given variable.

I saw in this post that is was fixed for Thymeleaf, but when using JSF/PrimeFaces, it’s still detected as an issue.

Could someone take a look at it?
Thank you in advance.

  • Operating system: Linux Mint 21 Cinnamon 5.4.12
  • SonarLint plugin version:
  • Programming language you’re coding in: Java 11 with JSF and PrimeFaces 11.0.6
  • Is connected mode used: No

Hey there.

Thanks for the feedback. It looks like we already have a ticket for this case.


This should make its way into the next SonarLint release.


Thank you for your reply.

It says it’s fixed in SONARHTML-139, but it mentions thymesVar.
Since we don’t use Thymeleaf, will the fix work for us too?

I confirm, as does the commit. :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.