Module: RuboCop::Cop::IndexedMethodArity

Included in:
Lint::ArgumentMismatch, Lint::SuperArgumentMismatch
Defined in:
lib/rubocop/cop/mixin/indexed_method_arity.rb

Overview

Shared machinery for cops that compare a call site's arguments against a method signature from the project index (Rubydex::Signature).

A signature is reduced to a shape - [min, max, has_keywords] where max is nil for a rest parameter - and the number of positional arguments a call passes is counted with Ruby's semantics for trailing keyword hashes: keywords passed to a method with no keyword parameters collapse into a single positional hash.