Functions without return statements

Author: LGTM

import javascript

from Function f
where
  exists(f.getABodyStmt()) and
  not exists(ReturnStmt r | r.getContainer() = f)
select f

Description

Finds functions that do not contain a return statement