Class: RuboCop::Cop::Workit::NoopRescue
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Workit::NoopRescue
- Defined in:
- lib/rubocop/cop/workit/noop_rescue.rb
Overview
Check for suppress or ignore checked exception.
Constant Summary collapse
- MSG =
"Don't suppress or ignore checked exception."
Instance Method Summary collapse
Instance Method Details
#on_resbody(node) ⇒ Object
37 38 39 |
# File 'lib/rubocop/cop/workit/noop_rescue.rb', line 37 def on_resbody(node) add_offense(node) if noop?(node.body) end |
#send_node_include?(node) ⇒ Object
33 34 35 |
# File 'lib/rubocop/cop/workit/noop_rescue.rb', line 33 def_node_search :send_node_include?, <<~PATTERN (send ...) PATTERN |