rokucommunity / bslint

A linter for BrightScript and BrighterScript.
MIT License
28 stars 15 forks source link

throw should be considered for "Not all code paths return a value" #71

Closed TwitchBronBron closed 1 year ago

TwitchBronBron commented 2 years ago

We consider throw statements as return statements when considering "not all code paths return a value" check.

image

elsassph commented 2 years ago

Yes, not only do we need to count throw like a return, but it should be counted like a "wildcard" case which satisfies both returning a value and returning void...

georgejecook commented 1 year ago

What's needed to fix this? I'll do it. I'm tired of faux returns to counter this.. ugly.

elsassph commented 1 year ago

It should be fixed since https://github.com/rokucommunity/bslint/pull/78 but maybe it wasn't released?

TwitchBronBron commented 1 year ago

Yeah, this has been fixed in a recent release.