Skip to content

Commit 786bc96

Browse files
test(no_empty_block): add test case for nested if else with comment
1 parent 10b3de0 commit 786bc96

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lint_test/no_empty_block_test.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,14 @@ void anotherExample() {
6969
// explain why this block is empty
7070
});
7171
}
72+
73+
void nestedIfElse() {
74+
if (true) {
75+
if (true) {
76+
// no lint
77+
if (true) {
78+
// explain why this block is empty
79+
}
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)