Skip to content

Files

Latest commit

 

History

History
48 lines (37 loc) · 491 Bytes

Lint-EmptyEnsure.md

File metadata and controls

48 lines (37 loc) · 491 Bytes

Pattern: Empty ensure

Issue: -

Description

This rule checks for empty ensure blocks

Examples

# bad

def some_method
  do_something
ensure
end
# bad

begin
  do_something
ensure
end
# good

def some_method
  do_something
ensure
  do_something_else
end
# good

begin
  do_something
ensure
  do_something_else
end

Further Reading