-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Returns inside try or if/else conditions were not being detected as useless. Said nodes are now checked for return statements to ensure their last component is not a useless return as well. Closes #9449.
- Loading branch information
1 parent
0b212cf
commit 96b1c47
Showing
6 changed files
with
45 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
If and Try nodes are now checked for useless return statements as well. | ||
|
||
Closes #9449. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
useless-return:4:0:4:10:myfunc:Useless return at end of function or method:UNDEFINED | ||
useless-return:9:4:9:16:SomeClass.mymethod:Useless return at end of function or method:UNDEFINED | ||
useless-return:18:0:18:13:function2:Useless return at end of function or method:UNDEFINED | ||
useless-return:24:0:24:13:function3:Useless return at end of function or method:UNDEFINED | ||
useless-return:31:0:31:13:function4:Useless return at end of function or method:UNDEFINED | ||
useless-return:39:0:39:13:function5:Useless return at end of function or method:UNDEFINED |