Skip to content

deferred-return-function-not-called

Detect deferred setup calls whose returned function is not called.

Updated View as Markdown

Default severity: warning

Functions sometimes perform setup immediately and return a function that performs cleanup. Deferring only the first call delays setup until function exit and then discards the returned cleanup function.

Bad

defer setup()

Good

defer setup()()
Navigation

Type to search…

↑↓ navigate↵ selectEsc close