Commit 3cd9d5e
feat(lint): add [shadow-var] rule — detect variable redeclaration in same scope
Flags `h x = ...; h x = ...` in the same statement list with a hint
suggesting `x = ...` assignment instead. Correctly scoped: re-declaring
inside an inner block (if/while body) does not trigger the rule.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 819a614 commit 3cd9d5e
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1402 | 1402 | | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
| 1405 | + | |
1406 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
1407 | 1423 | | |
1408 | 1424 | | |
1409 | 1425 | | |
| |||
0 commit comments