Class: RuboCop::Cop::Kaizo::PositionalArguments
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Kaizo::PositionalArguments
- Includes:
- ArgumentCounting
- Defined in:
- lib/rubocop/cop/kaizo/positional_arguments.rb
Overview
Checks that a method does not declare too many positional arguments.
Positional arguments are unnamed and order-dependent, which makes a long
list of them especially prone to primitive obsession. Required (arg)
and optional (optarg) parameters are counted; *rest and &block are
not.
Constant Summary collapse
- KIND =
"positional arguments".freeze
Constants included from ArgumentCounting
ArgumentCounting::DEFINE_METHODS, ArgumentCounting::KEYWORD_TYPES, ArgumentCounting::MSG, ArgumentCounting::POSITIONAL_TYPES, ArgumentCounting::STRUCT_OR_DATA