(CRT-A0011) Nested if can be replaced with else-if
johnsonjh opened this issue · comments
Jeffrey H. Johnson commented
Description
It's better to have as little nesting as possible. Hence, it's cleaner to replace a single nested if
inside an else
with an else-if
. For example: go if cond1 { // do something } else { if x := cond2; x { // do something else } }
can …
Occurrences
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/jleveldb/issue/CRT-A0011/occurrences/
Repo Ranger commented