noUselessElse is bad in some cases #2581
Jack-Works
started this conversation in
General
Replies: 1 comment
-
We picked this up from another ecosystem and were happy with the results. Readability is a subjective matter, and there is no right answer. You can still disable the rule if you don't want it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For code
This rule harms the readability in this case.
You can know that
f
only falls into oneif
branch because all branches areif, else if, else
with only a glimpse, but you cannot get that information fromf2
. You need to analyzef2
to understand what it does.Beta Was this translation helpful? Give feedback.
All reactions