Ignore plain nodes for haml linter

Problem to solve

I ran into an lint error:

[W] NoPlainNodes: `×` is a plain node. Please use an i18n method like `= _('×')`

Intended users

Developers

Further details

The linter was introduced with this MR.

This happens when using plain nodes (no i18n) in haml files. While it makes sense to change plain texts to use an i18n method, it does not make sense to add it to something like ×:

%span{ "aria-hidden": true } ×

Proposal

There are currently two ways to solve this:

  1. You can add the haml file to the haml lint todo file
  2. You use '= &times'.html_safe; instead of ×

But a nicer way would be to ignore something like this. Maybe by ignoring plain entities.

What does success look like, and how can we measure that?

We don't have to do 1. or 2. to get the a green pipeline for statitc-analysis.

Links / references

https://gitlab.com/gitlab-org/gitlab/-/jobs/397926665#L60

Edited by Corinna Gogolok