Angular html attributes

There seems to be an issue in both sonarlint and sonarqube when it comes to Angular and attributes.
In order to bind an attribute with angular you need the prefix “attr.” in front of it but then the control thinks that the attribute is actually missing. Can we do something about this?

SonarQube version: Developer Edition 9.3.0.51899
SonarLint version: 6.0.0.45402


Fyi: @Rahul_Mahulkar

Hi @ganncamp, Apologies to tag you again. But you are the one who always responds.
Could you please help here? At least someone takes first look.

Regards
Rahul Mahulkar

Hello @empouras and @Rahul_Mahulkar,

Excuses for the delayed response on this.

You are right. This can lead to wrong issues in some rules.

We did add a fix some time ago to catch the [attr.foo]=... cases (SONARHTML-118), but did miss that there is also a syntax without the brackets. I did create SONARHTML-158 to handle this in the next release (not planned yet).

Thank you for reporting this!

Best,
Karim.

1 Like

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