MandatoryBracesIfStatement to highlight only if/else keywords #5317
Labels
feature
good first issue
Issue that is easy to pickup for people that are new to the project
help wanted
Pretty much the same as #5316, but a different rule.
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, but some rules report on the blocks which could be quite large, therefor hiding potential crashes, which could be quite serious. In the example above the
MandatoryBracesIfStatement
hides anUnsafeCallOnNullableType
(potential NPE).Expected Behavior of the rule
Move the highlight of the reported violation to the
if
keyword and theelse
keyword. Note to implementer: mindelse if
s.The text was updated successfully, but these errors were encountered: