CodeQL queries 1.25
Skip to end of metadata
Go to start of metadata

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 f