Else after all returns

 home quick fix styleguide  single file   example  edit

else_after_all_returns

Description

Finds ELSE branches that are redundant because all prior branches exit unconditionally.

Extended Information

When every branch preceding ELSE ends with RETURN, EXIT, or CONTINUE (or a non-resumable RAISE / LEAVE), the ELSE keyword adds no logical value and can be removed by de-indenting its body.

Default Configuration

Hover to see descriptions, Ctrl+Space for suggestions

Examples