Skip to content

Commit

Permalink
Use RESTRICT_ON_SEND
Browse files Browse the repository at this point in the history
Follow up to rubocop/rubocop#8365.

This PR uses `RESTRICT_ON_SEND` to restrict callbacks `on_send`
to specific method names only.
  • Loading branch information
koic committed Aug 10, 2021
1 parent 5a1d4ab commit afc0d4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rubocop/cop/rake/helper/on_task.rb
Expand Up @@ -7,6 +7,8 @@ module Helper
module OnTask
extend NodePattern::Macros

RESTRICT_ON_SEND = %i[task].freeze

def_node_matcher :task?, <<~PATTERN
(send nil? :task ...)
PATTERN
Expand Down

0 comments on commit afc0d4f

Please sign in to comment.