Parent

Roodi::Checks::EmptyRescueBodyCheck

Checks the body of a rescue block to make sure it's not empty..

When the body of a rescue block is empty, exceptions can get caught and swallowed without any feedback to the user.

Constants

STATEMENT_NODES

Public Instance Methods

evaluate_start(node) click to toggle source
# File lib/roodi/checks/empty_rescue_body_check.rb, line 16
def evaluate_start(node)
  add_error("Rescue block should not be empty.") unless has_statement?(node.children[1])
end
interesting_nodes() click to toggle source
# File lib/roodi/checks/empty_rescue_body_check.rb, line 12
def interesting_nodes
  [:resbody]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.