123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::ExcludeLimit

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Cop::Base, Cop::Bundler::DuplicatedGem, Cop::Bundler::DuplicatedGroup, Cop::Bundler::GemComment, Cop::Bundler::GemFilename, Cop::Bundler::GemVersion, Cop::Bundler::InsecureProtocolSource, Cop::Bundler::OrderedGems, Cop::CodeLength, Cop::Cop, Cop::Gemspec::DependencyVersion, Cop::Gemspec::DeprecatedAttributeAssignment, Cop::Gemspec::DevelopmentDependencies, Cop::Gemspec::DuplicatedAssignment, Cop::Gemspec::OrderedDependencies, Cop::Gemspec::RequireMFA, Cop::Gemspec::RequiredRubyVersion, Cop::Gemspec::RubyVersionGlobalsUsage, Cop::InternalAffairs::CopDescription, Cop::InternalAffairs::CreateEmptyFile, Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection, Cop::InternalAffairs::ExampleDescription, Cop::InternalAffairs::ExampleHeredocDelimiter, Cop::InternalAffairs::InheritDeprecatedCopClass, Cop::InternalAffairs::LambdaOrProc, Cop::InternalAffairs::LocationExpression, Cop::InternalAffairs::LocationLineEqualityComparison, Cop::InternalAffairs::MethodNameEndWith, Cop::InternalAffairs::MethodNameEqual, Cop::InternalAffairs::NodeDestructuring, Cop::InternalAffairs::NodeFirstOrLastArgument, Cop::InternalAffairs::NodeMatcherDirective, Cop::InternalAffairs::NodeTypePredicate, Cop::InternalAffairs::NumblockHandler, Cop::InternalAffairs::OffenseLocationKeyword, Cop::InternalAffairs::ProcessedSourceBufferName, Cop::InternalAffairs::RedundantContextConfigParameter, Cop::InternalAffairs::RedundantDescribedClassAsSubject, Cop::InternalAffairs::RedundantExpectOffenseArguments, Cop::InternalAffairs::RedundantLetRuboCopConfigNew, Cop::InternalAffairs::RedundantLocationArgument, Cop::InternalAffairs::RedundantMessageArgument, Cop::InternalAffairs::RedundantMethodDispatchNode, Cop::InternalAffairs::RedundantSourceRange, Cop::InternalAffairs::SingleLineComparison, Cop::InternalAffairs::StyleDetectedApiUse, Cop::InternalAffairs::UndefinedConfig, Cop::InternalAffairs::UselessMessageAssertion, Cop::InternalAffairs::UselessRestrictOnSend, Cop::Layout::AccessModifierIndentation, Cop::Layout::ArgumentAlignment, Cop::Layout::ArrayAlignment, Cop::Layout::AssignmentIndentation, Cop::Layout::BeginEndAlignment, Cop::Layout::BlockAlignment, Cop::Layout::BlockEndNewline, Cop::Layout::CaseIndentation, Cop::Layout::ClassStructure, Cop::Layout::ClosingHeredocIndentation, Cop::Layout::ClosingParenthesisIndentation, Cop::Layout::CommentIndentation, Cop::Layout::ConditionPosition, Cop::Layout::DefEndAlignment, Cop::Layout::DotPosition, Cop::Layout::ElseAlignment, Cop::Layout::EmptyComment, Cop::Layout::EmptyLineAfterGuardClause, Cop::Layout::EmptyLineAfterMagicComment, Cop::Layout::EmptyLineAfterMultilineCondition, Cop::Layout::EmptyLineBetweenDefs, Cop::Layout::EmptyLines, Cop::Layout::EmptyLinesAroundAccessModifier, Cop::Layout::EmptyLinesAroundArguments, Cop::Layout::EmptyLinesAroundAttributeAccessor, Cop::Layout::EmptyLinesAroundBeginBody, Cop::Layout::EmptyLinesAroundBlockBody, Cop::Layout::EmptyLinesAroundClassBody, Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords, Cop::Layout::EmptyLinesAroundMethodBody, Cop::Layout::EmptyLinesAroundModuleBody, Cop::Layout::EndAlignment, Cop::Layout::EndOfLine, Cop::Layout::ExtraSpacing, Cop::Layout::FirstArgumentIndentation, Cop::Layout::FirstArrayElementIndentation, Cop::Layout::FirstArrayElementLineBreak, Cop::Layout::FirstHashElementIndentation, Cop::Layout::FirstHashElementLineBreak, Cop::Layout::FirstMethodArgumentLineBreak, Cop::Layout::FirstMethodParameterLineBreak, Cop::Layout::FirstParameterIndentation, Cop::Layout::HashAlignment, Cop::Layout::HeredocArgumentClosingParenthesis, Cop::Layout::HeredocIndentation, Cop::Layout::IndentationConsistency, Cop::Layout::IndentationStyle, Cop::Layout::IndentationWidth, Cop::Layout::InitialIndentation, Cop::Layout::LeadingCommentSpace, Cop::Layout::LeadingEmptyLines, Cop::Layout::LineContinuationLeadingSpace, Cop::Layout::LineContinuationSpacing, Cop::Layout::LineEndStringConcatenationIndentation, Cop::Layout::LineLength, Cop::Layout::MultilineArrayBraceLayout, Cop::Layout::MultilineArrayLineBreaks, Cop::Layout::MultilineAssignmentLayout, Cop::Layout::MultilineBlockLayout, Cop::Layout::MultilineHashBraceLayout, Cop::Layout::MultilineHashKeyLineBreaks, Cop::Layout::MultilineMethodArgumentLineBreaks, Cop::Layout::MultilineMethodCallBraceLayout, Cop::Layout::MultilineMethodCallIndentation, Cop::Layout::MultilineMethodDefinitionBraceLayout, Cop::Layout::MultilineMethodParameterLineBreaks, Cop::Layout::MultilineOperationIndentation, Cop::Layout::ParameterAlignment, Cop::Layout::RedundantLineBreak, Cop::Layout::RescueEnsureAlignment, Cop::Layout::SingleLineBlockChain, Cop::Layout::SpaceAfterColon, Cop::Layout::SpaceAfterComma, Cop::Layout::SpaceAfterMethodName, Cop::Layout::SpaceAfterNot, Cop::Layout::SpaceAfterSemicolon, Cop::Layout::SpaceAroundBlockParameters, Cop::Layout::SpaceAroundEqualsInParameterDefault, Cop::Layout::SpaceAroundKeyword, Cop::Layout::SpaceAroundMethodCallOperator, Cop::Layout::SpaceAroundOperators, Cop::Layout::SpaceBeforeBlockBraces, Cop::Layout::SpaceBeforeBrackets, Cop::Layout::SpaceBeforeComma, Cop::Layout::SpaceBeforeComment, Cop::Layout::SpaceBeforeFirstArg, Cop::Layout::SpaceBeforeSemicolon, Cop::Layout::SpaceInLambdaLiteral, Cop::Layout::SpaceInsideArrayLiteralBrackets, Cop::Layout::SpaceInsideArrayPercentLiteral, Cop::Layout::SpaceInsideBlockBraces, Cop::Layout::SpaceInsideHashLiteralBraces, Cop::Layout::SpaceInsideParens, Cop::Layout::SpaceInsidePercentLiteralDelimiters, Cop::Layout::SpaceInsideRangeLiteral, Cop::Layout::SpaceInsideReferenceBrackets, Cop::Layout::SpaceInsideStringInterpolation, Cop::Layout::TrailingEmptyLines, Cop::Layout::TrailingWhitespace, Cop::Lint::AmbiguousAssignment, Cop::Lint::AmbiguousBlockAssociation, Cop::Lint::AmbiguousOperator, Cop::Lint::AmbiguousOperatorPrecedence, Cop::Lint::AmbiguousRange, Cop::Lint::AmbiguousRegexpLiteral, Cop::Lint::AssignmentInCondition, Cop::Lint::BigDecimalNew, Cop::Lint::BinaryOperatorWithIdenticalOperands, Cop::Lint::BooleanSymbol, Cop::Lint::CircularArgumentReference, Cop::Lint::ConstantDefinitionInBlock, Cop::Lint::ConstantOverwrittenInRescue, Cop::Lint::ConstantResolution, Cop::Lint::Debugger, Cop::Lint::DeprecatedClassMethods, Cop::Lint::DeprecatedConstants, Cop::Lint::DeprecatedOpenSSLConstant, Cop::Lint::DisjunctiveAssignmentInConstructor, Cop::Lint::DuplicateBranch, Cop::Lint::DuplicateCaseCondition, Cop::Lint::DuplicateElsifCondition, Cop::Lint::DuplicateHashKey, Cop::Lint::DuplicateMagicComment, Cop::Lint::DuplicateMatchPattern, Cop::Lint::DuplicateMethods, Cop::Lint::DuplicateRegexpCharacterClassElement, Cop::Lint::DuplicateRequire, Cop::Lint::DuplicateRescueException, Cop::Lint::EachWithObjectArgument, Cop::Lint::ElseLayout, Cop::Lint::EmptyBlock, Cop::Lint::EmptyClass, Cop::Lint::EmptyConditionalBody, Cop::Lint::EmptyEnsure, Cop::Lint::EmptyExpression, Cop::Lint::EmptyFile, Cop::Lint::EmptyInPattern, Cop::Lint::EmptyInterpolation, Cop::Lint::EmptyWhen, Cop::Lint::EnsureReturn, Cop::Lint::ErbNewArguments, Cop::Lint::FlipFlop, Cop::Lint::FloatComparison, Cop::Lint::FloatOutOfRange, Cop::Lint::FormatParameterMismatch, Cop::Lint::HashCompareByIdentity, Cop::Lint::HeredocMethodCallPosition, Cop::Lint::IdentityComparison, Cop::Lint::ImplicitStringConcatenation, Cop::Lint::IncompatibleIoSelectWithFiberScheduler, Cop::Lint::IneffectiveAccessModifier, Cop::Lint::InheritException, Cop::Lint::InterpolationCheck, Cop::Lint::ItWithoutArgumentsInBlock, Cop::Lint::LambdaWithoutLiteralBlock, Cop::Lint::LiteralAsCondition, Cop::Lint::LiteralAssignmentInCondition, Cop::Lint::LiteralInInterpolation, Cop::Lint::Loop, Cop::Lint::MissingCopEnableDirective, Cop::Lint::MissingSuper, Cop::Lint::MixedCaseRange, Cop::Lint::MixedRegexpCaptureTypes, Cop::Lint::MultipleComparison, Cop::Lint::NestedMethodDefinition, Cop::Lint::NestedPercentLiteral, Cop::Lint::NextWithoutAccumulator, Cop::Lint::NoReturnInBeginEndBlocks, Cop::Lint::NonAtomicFileOperation, Cop::Lint::NonDeterministicRequireOrder, Cop::Lint::NonLocalExitFromIterator, Cop::Lint::NumberConversion, Cop::Lint::NumberedParameterAssignment, Cop::Lint::OrAssignmentToConstant, Cop::Lint::OrderedMagicComments, Cop::Lint::OutOfRangeRegexpRef, Cop::Lint::ParenthesesAsGroupedExpression, Cop::Lint::PercentStringArray, Cop::Lint::PercentSymbolArray, Cop::Lint::RaiseException, Cop::Lint::RandOne, Cop::Lint::RedundantCopDisableDirective, Cop::Lint::RedundantCopEnableDirective, Cop::Lint::RedundantDirGlobSort, Cop::Lint::RedundantRegexpQuantifiers, Cop::Lint::RedundantRequireStatement, Cop::Lint::RedundantSafeNavigation, Cop::Lint::RedundantSplatExpansion, Cop::Lint::RedundantStringCoercion, Cop::Lint::RedundantWithIndex, Cop::Lint::RedundantWithObject, Cop::Lint::RefinementImportMethods, Cop::Lint::RegexpAsCondition, Cop::Lint::RequireParentheses, Cop::Lint::RequireRangeParentheses, Cop::Lint::RequireRelativeSelfPath, Cop::Lint::RescueException, Cop::Lint::RescueType, Cop::Lint::ReturnInVoidContext, Cop::Lint::SafeNavigationChain, Cop::Lint::SafeNavigationConsistency, Cop::Lint::SafeNavigationWithEmpty, Cop::Lint::ScriptPermission, Cop::Lint::SelfAssignment, Cop::Lint::SendWithMixinArgument, Cop::Lint::ShadowedArgument, Cop::Lint::ShadowedException, Cop::Lint::ShadowingOuterLocalVariable, Cop::Lint::StructNewOverride, Cop::Lint::SuppressedException, Cop::Lint::SymbolConversion, Cop::Lint::Syntax, Cop::Lint::ToEnumArguments, Cop::Lint::ToJSON, Cop::Lint::TopLevelReturnWithArgument, Cop::Lint::TrailingCommaInAttributeDeclaration, Cop::Lint::TripleQuotes, Cop::Lint::UnderscorePrefixedVariableName, Cop::Lint::UnexpectedBlockArity, Cop::Lint::UnifiedInteger, Cop::Lint::UnmodifiedReduceAccumulator, Cop::Lint::UnreachableCode, Cop::Lint::UnreachableLoop, Cop::Lint::UnusedBlockArgument, Cop::Lint::UnusedMethodArgument, Cop::Lint::UriEscapeUnescape, Cop::Lint::UriRegexp, Cop::Lint::UselessAccessModifier, Cop::Lint::UselessAssignment, Cop::Lint::UselessElseWithoutRescue, Cop::Lint::UselessMethodDefinition, Cop::Lint::UselessRescue, Cop::Lint::UselessRuby2Keywords, Cop::Lint::UselessSetterCall, Cop::Lint::UselessTimes, Cop::Lint::Void, Cop::MethodComplexity, Cop::Metrics::AbcSize, Cop::Metrics::BlockLength, Cop::Metrics::BlockNesting, Cop::Metrics::ClassLength, Cop::Metrics::CollectionLiteralLength, Cop::Metrics::CyclomaticComplexity, Cop::Metrics::MethodLength, Cop::Metrics::ModuleLength, Cop::Metrics::ParameterLists, Cop::Metrics::PerceivedComplexity, Cop::Migration::DepartmentName, Cop::Naming::AccessorMethodName, Cop::Naming::AsciiIdentifiers, Cop::Naming::BinaryOperatorParameterName, Cop::Naming::BlockForwarding, Cop::Naming::BlockParameterName, Cop::Naming::ClassAndModuleCamelCase, Cop::Naming::ConstantName, Cop::Naming::FileName, Cop::Naming::HeredocDelimiterCase, Cop::Naming::HeredocDelimiterNaming, Cop::Naming::InclusiveLanguage, Cop::Naming::MemoizedInstanceVariableName, Cop::Naming::MethodName, Cop::Naming::MethodParameterName, Cop::Naming::PredicateName, Cop::Naming::RescuedExceptionsVariableName, Cop::Naming::VariableName, Cop::Naming::VariableNumber, Cop::Security::CompoundHash, Cop::Security::Eval, Cop::Security::IoMethods, Cop::Security::JSONLoad, Cop::Security::MarshalLoad, Cop::Security::Open, Cop::Security::YAMLLoad, Cop::Style::AccessModifierDeclarations, Cop::Style::AccessorGrouping, Cop::Style::Alias, Cop::Style::AndOr, Cop::Style::ArgumentsForwarding, Cop::Style::ArrayCoercion, Cop::Style::ArrayFirstLast, Cop::Style::ArrayIntersect, Cop::Style::ArrayJoin, Cop::Style::AsciiComments, Cop::Style::Attr, Cop::Style::AutoResourceCleanup, Cop::Style::BarePercentLiterals, Cop::Style::BeginBlock, Cop::Style::BisectedAttrAccessor, Cop::Style::BlockComments, Cop::Style::BlockDelimiters, Cop::Style::CaseEquality, Cop::Style::CaseLikeIf, Cop::Style::CharacterLiteral, Cop::Style::ClassAndModuleChildren, Cop::Style::ClassCheck, Cop::Style::ClassEqualityComparison, Cop::Style::ClassMethods, Cop::Style::ClassMethodsDefinitions, Cop::Style::ClassVars, Cop::Style::CollectionCompact, Cop::Style::CollectionMethods, Cop::Style::ColonMethodCall, Cop::Style::ColonMethodDefinition, Cop::Style::CombinableLoops, Cop::Style::CommandLiteral, Cop::Style::CommentAnnotation, Cop::Style::CommentedKeyword, Cop::Style::ComparableClamp, Cop::Style::ConcatArrayLiterals, Cop::Style::ConditionalAssignment, Cop::Style::ConstantVisibility, Cop::Style::Copyright, Cop::Style::DataInheritance, Cop::Style::DateTime, Cop::Style::DefWithParentheses, Cop::Style::Dir, Cop::Style::DirEmpty, Cop::Style::DisableCopsWithinSourceCodeDirective, Cop::Style::DocumentDynamicEvalDefinition, Cop::Style::Documentation, Cop::Style::DocumentationMethod, Cop::Style::DoubleCopDisableDirective, Cop::Style::DoubleNegation, Cop::Style::EachForSimpleLoop, Cop::Style::EachWithObject, Cop::Style::EmptyBlockParameter, Cop::Style::EmptyCaseCondition, Cop::Style::EmptyElse, Cop::Style::EmptyHeredoc, Cop::Style::EmptyLambdaParameter, Cop::Style::EmptyLiteral, Cop::Style::EmptyMethod, Cop::Style::Encoding, Cop::Style::EndBlock, Cop::Style::EndlessMethod, Cop::Style::EnvHome, Cop::Style::EvalWithLocation, Cop::Style::EvenOdd, Cop::Style::ExactRegexpMatch, Cop::Style::ExpandPathArguments, Cop::Style::ExplicitBlockArgument, Cop::Style::ExponentialNotation, Cop::Style::FetchEnvVar, Cop::Style::FileEmpty, Cop::Style::FileRead, Cop::Style::FileWrite, Cop::Style::FloatDivision, Cop::Style::For, Cop::Style::FormatString, Cop::Style::FormatStringToken, Cop::Style::FrozenStringLiteralComment, Cop::Style::GlobalStdStream, Cop::Style::GlobalVars, Cop::Style::GuardClause, Cop::Style::HashAsLastArrayItem, Cop::Style::HashConversion, Cop::Style::HashEachMethods, Cop::Style::HashExcept, Cop::Style::HashLikeCase, Cop::Style::HashSyntax, Cop::Style::HashTransformKeys, Cop::Style::HashTransformValues, Cop::Style::IdenticalConditionalBranches, Cop::Style::IfInsideElse, Cop::Style::IfUnlessModifier, Cop::Style::IfUnlessModifierOfIfUnless, Cop::Style::IfWithBooleanLiteralBranches, Cop::Style::IfWithSemicolon, Cop::Style::ImplicitRuntimeError, Cop::Style::InPatternThen, Cop::Style::InfiniteLoop, Cop::Style::InlineComment, Cop::Style::InverseMethods, Cop::Style::InvertibleUnlessCondition, Cop::Style::IpAddresses, Cop::Style::KeywordParametersOrder, Cop::Style::Lambda, Cop::Style::LambdaCall, Cop::Style::LineEndConcatenation, Cop::Style::MagicCommentFormat, Cop::Style::MapCompactWithConditionalBlock, Cop::Style::MapIntoArray, Cop::Style::MapToHash, Cop::Style::MapToSet, Cop::Style::MethodCallWithArgsParentheses, Cop::Style::MethodCallWithoutArgsParentheses, Cop::Style::MethodCalledOnDoEndBlock, Cop::Style::MethodDefParentheses, Cop::Style::MinMax, Cop::Style::MinMaxComparison, Cop::Style::MissingElse, Cop::Style::MissingRespondToMissing, Cop::Style::MixinGrouping, Cop::Style::MixinUsage, Cop::Style::ModuleFunction, Cop::Style::MultilineBlockChain, Cop::Style::MultilineIfModifier, Cop::Style::MultilineIfThen, Cop::Style::MultilineInPatternThen, Cop::Style::MultilineMemoization, Cop::Style::MultilineMethodSignature, Cop::Style::MultilineTernaryOperator, Cop::Style::MultilineWhenThen, Cop::Style::MultipleComparison, Cop::Style::MutableConstant, Cop::Style::NegatedIf, Cop::Style::NegatedIfElseCondition, Cop::Style::NegatedUnless, Cop::Style::NegatedWhile, Cop::Style::NestedFileDirname, Cop::Style::NestedModifier, Cop::Style::NestedParenthesizedCalls, Cop::Style::NestedTernaryOperator, Cop::Style::Next, Cop::Style::NilComparison, Cop::Style::NilLambda, Cop::Style::NonNilCheck, Cop::Style::Not, Cop::Style::NumberedParameters, Cop::Style::NumberedParametersLimit, Cop::Style::NumericLiteralPrefix, Cop::Style::NumericLiterals, Cop::Style::NumericPredicate, Cop::Style::ObjectThen, Cop::Style::OneLineConditional, Cop::Style::OpenStructUse, Cop::Style::OperatorMethodCall, Cop::Style::OptionHash, Cop::Style::OptionalArguments, Cop::Style::OptionalBooleanParameter, Cop::Style::OrAssignment, Cop::Style::ParallelAssignment, Cop::Style::ParenthesesAroundCondition, Cop::Style::PercentLiteralDelimiters, Cop::Style::PercentQLiterals, Cop::Style::PerlBackrefs, Cop::Style::PreferredHashMethods, Cop::Style::Proc, Cop::Style::QuotedSymbols, Cop::Style::RaiseArgs, Cop::Style::RandomWithOffset, Cop::Style::RedundantArgument, Cop::Style::RedundantArrayConstructor, Cop::Style::RedundantAssignment, Cop::Style::RedundantBegin, Cop::Style::RedundantCapitalW, Cop::Style::RedundantCondition, Cop::Style::RedundantConditional, Cop::Style::RedundantConstantBase, Cop::Style::RedundantCurrentDirectoryInPath, Cop::Style::RedundantDoubleSplatHashBraces, Cop::Style::RedundantEach, Cop::Style::RedundantException, Cop::Style::RedundantFetchBlock, Cop::Style::RedundantFileExtensionInRequire, Cop::Style::RedundantFilterChain, Cop::Style::RedundantFreeze, Cop::Style::RedundantHeredocDelimiterQuotes, Cop::Style::RedundantInitialize, Cop::Style::RedundantInterpolation, Cop::Style::RedundantLineContinuation, Cop::Style::RedundantParentheses, Cop::Style::RedundantPercentQ, Cop::Style::RedundantRegexpArgument, Cop::Style::RedundantRegexpCharacterClass, Cop::Style::RedundantRegexpConstructor, Cop::Style::RedundantRegexpEscape, Cop::Style::RedundantReturn, Cop::Style::RedundantSelf, Cop::Style::RedundantSelfAssignment, Cop::Style::RedundantSelfAssignmentBranch, Cop::Style::RedundantSort, Cop::Style::RedundantSortBy, Cop::Style::RedundantStringEscape, Cop::Style::RegexpLiteral, Cop::Style::RequireOrder, Cop::Style::RescueModifier, Cop::Style::RescueStandardError, Cop::Style::ReturnNil, Cop::Style::ReturnNilInPredicateMethodDefinition, Cop::Style::SafeNavigation, Cop::Style::Sample, Cop::Style::SelectByRegexp, Cop::Style::SelfAssignment, Cop::Style::Semicolon, Cop::Style::Send, Cop::Style::SendWithLiteralMethodName, Cop::Style::SignalException, Cop::Style::SingleArgumentDig, Cop::Style::SingleLineBlockParams, Cop::Style::SingleLineDoEndBlock, Cop::Style::SingleLineMethods, Cop::Style::SlicingWithRange, Cop::Style::SoleNestedConditional, Cop::Style::SpecialGlobalVars, Cop::Style::StabbyLambdaParentheses, Cop::Style::StaticClass, Cop::Style::StderrPuts, Cop::Style::StringChars, Cop::Style::StringConcatenation, Cop::Style::StringHashKeys, Cop::Style::StringLiterals, Cop::Style::StringLiteralsInInterpolation, Cop::Style::StringMethods, Cop::Style::Strip, Cop::Style::StructInheritance, Cop::Style::SuperArguments, Cop::Style::SuperWithArgsParentheses, Cop::Style::SwapValues, Cop::Style::SymbolArray, Cop::Style::SymbolLiteral, Cop::Style::SymbolProc, Cop::Style::TernaryParentheses, Cop::Style::TopLevelMethodDefinition, Cop::Style::TrailingBodyOnClass, Cop::Style::TrailingBodyOnMethodDefinition, Cop::Style::TrailingBodyOnModule, Cop::Style::TrailingCommaInArguments, Cop::Style::TrailingCommaInArrayLiteral, Cop::Style::TrailingCommaInBlockArgs, Cop::Style::TrailingCommaInHashLiteral, Cop::Style::TrailingMethodEndStatement, Cop::Style::TrailingUnderscoreVariable, Cop::Style::TrivialAccessors, Cop::Style::UnlessElse, Cop::Style::UnlessLogicalOperators, Cop::Style::UnpackFirst, Cop::Style::VariableInterpolation, Cop::Style::WhenThen, Cop::Style::WhileUntilDo, Cop::Style::WhileUntilModifier, Cop::Style::WordArray, Cop::Style::YAMLFileRead, Cop::Style::YodaCondition, Cop::Style::YodaExpression, Cop::Style::ZeroLengthPredicate
Defined in: lib/rubocop/cop/exclude_limit.rb

Overview

Allows specified configuration options to have an exclude limit ie. a maximum value tracked that it can be used by --auto-gen-config.

Instance Method Summary

Instance Method Details

#exclude_limit(parameter_name, method_name: transform(parameter_name))

Sets up a configuration option to have an exclude limit tracked. The parameter name given is transformed into a method name (eg. Max becomes self.max= and MinDigits becomes self.min_digits=).

[ GitHub ]

  
# File 'lib/rubocop/cop/exclude_limit.rb', line 10

def exclude_limit(parameter_name, method_name: transform(parameter_name))
  define_method(:"#{method_name}=") do |value|
    cfg = config_to_allow_offenses
    cfg[:exclude_limit] ||= {}
    current_max = cfg[:exclude_limit][parameter_name]
    value = [current_max, value].max if current_max
    cfg[:exclude_limit][parameter_name] = value
  end
end

#transform(parameter_name) (private)

[ GitHub ]

  
# File 'lib/rubocop/cop/exclude_limit.rb', line 22

def transform(parameter_name)
  parameter_name.gsub(/(?<!\A)(?=[A-Z])/, '_').downcase
end