-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6535) * Update: `no-unused-vars` ignores read it modifies itself (fixes #6348) `no-unused-vars` comes to ignore a read of a modification of itself. - A read in RHS of an assignment to itself (e.g. `a = a + 1`) - A read in LHS of an assignment (e.g. `a += 1`) - Increments/Decrements (e.g. `a++`) Those are ignored only if those exist at the direct child of an ExpressionStatement node. This is in order to avoid false positive such `foo(a = a + 1)` * Fix: remove unused variables which were found by this fix. * Chore: add some tests
- Loading branch information
1 parent
d601f6b
commit 1290657
Showing
5 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters