Linting rules
E027: identical-conditional-branches
Detects conditionals where both branches are structurally identical.
Metadata
Code:E027Rule:identical-conditional-branchesStatus: Stable sincev0.0.1Quick fix: not available
What it does
Detects conditionals where both branches are structurally identical.
Why is this bad?
Such condition has no effect on behavior and usually indicates a bug or a copy-paste mistake.
Example
if (flag) {
checkAccess();
} else {
checkAccess();}
val result = flag ? value + 1 : value + 1;Last updated on