Commit 9d86e9e
Generic/NestingLevel: ensure the sniff bails if
Quoting @jrfnl: "Only checking for the scope_opener, when
accessing/using both the scope_opener and scope_closer indexes, is
probably fine in practical terms. However, the part of the code base
which sets these indexes is not sufficiently covered by tests, nor does
it document that those indexes will only be set if both can be set, so
there may be edge case exceptions" (#684 (comment)).
The sniff was already working fine before this change. Checking if
`scope_closer` is just an extra precaution to err on the side of caution.
This commit also updates the related code comment to better reflect what
the if condition does.scope_closer is not set1 parent dc3c9e7 commit 9d86e9e
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments