Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LabeledExpression to highlight only label #5316

TWiStErRob opened this issue Sep 18, 2022 · 0 comments · Fixed by #5351

LabeledExpression to highlight only label #5316

TWiStErRob opened this issue Sep 18, 2022 · 0 comments · Fixed by #5351


Copy link

TWiStErRob commented Sep 18, 2022

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


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

3 participants