Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error for
InternalAffairs/NodeMatcherDirective
This PR fixes the following error for `InternalAffairs/NodeMatcherDirective`. ```console % cat example.rb def_node_matcher :foo?, format(PATTERN, type: 'const') % bundle exec rubocop --only InternalAffairs/NodeMatcherDirective -d (snip) Inspecting 1 file Scanning /Users/koic/src/github.com/koic/rubocop-issues/ia_cop/example.rb An error occurred while InternalAffairs/NodeMatcherDirective cop was inspecting /Users/koic/src/github.com/koic/rubocop-issues/ia_cop/example.rb:1:0. undefined method `value' for s(:send, nil, :format, s(:const, nil, :PATTERN), s(:hash, s(:pair, s(:sym, :type), s(:str, "const")))):RuboCop::AST::SendNode /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb:100:in `insert_directive' /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb:85:in `block in register_offense' (snip) 1 error occurred: An error occurred while InternalAffairs/NodeMatcherDirective cop was inspecting /Users/koic/src/github.com/koic/rubocop-issues/ia_cop/example.rb:1:0. Errors are usually caused by RuboCop bugs. Please, report your problems to RuboCop's issue tracker. https://github.com/rubocop/rubocop/issues ```
- Loading branch information