Class: RuboCop::Cop::Gusto::SidekiqParams
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Gusto::SidekiqParams
- Defined in:
- lib/rubocop/cop/gusto/sidekiq_params.rb
Constant Summary collapse
- MSG =
"Sidekiq perform methods cannot take keyword arguments"
Instance Method Summary collapse
Instance Method Details
#on_def(node) ⇒ Object
14 15 16 |
# File 'lib/rubocop/cop/gusto/sidekiq_params.rb', line 14 def on_def(node) add_offense(node) if perform_with_kwargs?(node) end |
#perform_with_kwargs?(node) ⇒ Object
10 11 12 |
# File 'lib/rubocop/cop/gusto/sidekiq_params.rb', line 10 def_node_matcher :perform_with_kwargs?, <<~PATTERN (def :perform (args <{kwarg kwoptarg} ...>) ...) PATTERN |