You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# G-4250: Avoid using identical conditions in different branches of the same IF or CASE statement.
2
+
3
+
!!! warning "Major"
4
+
Maintainability, Reliability, Testability
5
+
6
+
## Reason
7
+
8
+
Conditions are evaluated top to bottom in branches of a `case` statement or chain of `if`/`elsif` statements. The first condition to evaluate as true leads to that branch being executed, the rest will never execute. Having an identical duplicated condition in another branch will never be reached and will be dead code.
0 commit comments