-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't fire the duplicate return lint on positive exit codes
Reviewed By: periodic1236 Differential Revision: D38948922 fbshipit-source-id: 9e667fcc33c9df7a5608b61b87686a790667f16c
- Loading branch information
1 parent
7f18108
commit b10078b
Showing
3 changed files
with
66 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?hh | ||
|
||
enum MyExitCode: int { | ||
SUCCESS = 0; | ||
FAILURE = 1; | ||
} | ||
|
||
function main_function_early_terminate(): int { | ||
if (1 === 1) { | ||
return 0; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
function main_function_early_terminate_enum(): int { | ||
if (1 === 1) { | ||
return MyExitCode::SUCCESS; | ||
} | ||
|
||
return MyExitCode::SUCCESS; | ||
} |
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 @@ | ||
No lint errors |