Commit 9168f53
Generic/InlineControlStructure: remove redundant condition
This commit removes a redundant condition that was added in fbea319 to
support JS braceless do-while loops. A subsequent commit added similar
code to support braceless do-while loops (plus for/while loops without
body) for PHP, but it also works for JS (13c803b).
There are a few syntax error cases that were handled by the code that is
removed by this commit and are not handled by the code introduced in
13c803b. Without the removed code, they are now handled in a if
condition right below. I added two tests with those cases to ensure the
sniff continues working as expected.1 parent 38b4646 commit 9168f53
File tree
3 files changed
+10
-15
lines changed- src/Standards/Generic
- Sniffs/ControlStructures
- Tests/ControlStructures
3 files changed
+10
-15
lines changedLines changed: 0 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 98 | | |
114 | 99 | | |
115 | 100 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments