Web:WhiteSpaceAroundCheck false positive for server includes

Then tell us:

  • What language is this for?
    HTML
  • Which rule?
    Web:WhiteSpaceAroundCheck
  • Why do you believe it’s a false-positive/false-negative?

Server side includes should not need to follow rules for comments (see e.g. SSI includes is reported as comments)

  • SonarQube - 10.3.0.82913
  • How can we reproduce the problem?

<!--#if expr="$host = /myhost" -->

Hello @fassen,

Thank you for bringing this to our attention.

As you rightly pointed out, the rule should not trigger an issue when encountering Server-Side Includes.

I have created a ticket to promptly address this false positive.

Best regards.

1 Like

Nice! Thanks =)

1 Like