Warnings exists in some codebases, and that's ok, but then they make the code harder to read, then it becomes a problem. A warnings should highlight where the problem is, specifically. To draw a parallel: the duplicate code inspection in IDEA looks like this:
Luckily this screenshot also shows that the huge warning hides another warning, see the highlighted "Check" string. I wouldn't have noticed that in the current behavior, only after editing the code / fixing the issue and you never know which severity these hidden other warnings would be, it could've been a NPE, not a duplicate string.
The text was updated successfully, but these errors were encountered:
Currently the whole expression is highlighted, creating a lot of noise in the code:

Expected Behavior of the rule
I think it would be more than enough to highlight the label:

Similar accepted requests: #4749, #5310
Context
Warnings exists in some codebases, and that's ok, but then they make the code harder to read, then it becomes a problem. A warnings should highlight where the problem is, specifically. To draw a parallel: the duplicate code inspection in IDEA looks like this:

Luckily this screenshot also shows that the huge warning hides another warning, see the highlighted "Check" string. I wouldn't have noticed that in the current behavior, only after editing the code / fixing the issue and you never know which severity these hidden other warnings would be, it could've been a NPE, not a duplicate string.
The text was updated successfully, but these errors were encountered: