Ability to add custom rules in HTML code to check if token variables match the supported token list

Hi all,

In my HTML projects, we need to check if the tokens defined by developers in their source code are included in the list of tokens we support.

For example, if the code has tokens like {{User.firstname}} and {{User.lastname}}, but our supported token list only includes {{User.fullname}}, I want to flag this as an error so the developer can quickly correct it.

Is it possible to write a custom rule for this case? If yes, where should I start?

Thank you

Hey there.

We don’t support adding custom rules for HTML, except for using generic issue reports (which mean you can use whatever tool you want to produce a tool in the right format, and upload it alongside your SonarQube scan).