Functions without return statements
Author: LGTM
import javascript
from Function f
where
exists(f.getABodyStmt()) and
not exists(ReturnStmt r | r.getContainer() = f)
select fDescription
Finds functions that do not contain a return statement
import javascript
from Function f
where
exists(f.getABodyStmt()) and
not exists(ReturnStmt r | r.getContainer() = f)
select fFinds functions that do not contain a return statement