erikw/nestedtext-ruby

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
AllCops:
  TargetRubyVersion: 3.1
  UseCache: true
  Include:
  - lib/**/*.rb
  - test/**/*.rb
  Exclude:
  - script/*

inherit_mode:
  merge:
    - Exclude  # Merge my AllCops.Exclude with default exludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml

# Standard Cops
Gemspec/DateAssignment:
  Enabled: true
Gemspec/RequireMFA:
  Enabled: true
Layout/LineEndStringConcatenationIndentation:
  Enabled: true
Layout/SpaceBeforeBrackets:
  Enabled: true
Lint/AmbiguousAssignment:
  Enabled: true
Lint/AmbiguousOperatorPrecedence:
  Enabled: true
Lint/AmbiguousRange:
  Enabled: true
Lint/DeprecatedConstants:
  Enabled: true
Lint/DuplicateBranch:
  Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
  Enabled: true
Lint/EmptyBlock:
  Enabled: true
Lint/EmptyClass:
  Enabled: true
Lint/EmptyInPattern:
  Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler:
  Enabled: true
Lint/LambdaWithoutLiteralBlock:
  Enabled: true
Lint/NoReturnInBeginEndBlocks:
  Enabled: true
Lint/NumberedParameterAssignment:
  Enabled: true
Lint/OrAssignmentToConstant:
  Enabled: true
Lint/RedundantDirGlobSort:
  Enabled: true
Lint/RequireRelativeSelfPath:
  Enabled: true
Lint/SymbolConversion:
  Enabled: true
Lint/ToEnumArguments:
  Enabled: true
Lint/TripleQuotes:
  Enabled: true
Lint/UnexpectedBlockArity:
  Enabled: true
Lint/UnmodifiedReduceAccumulator:
  Enabled: true
Lint/UselessRuby2Keywords:
  Enabled: true
Naming/BlockForwarding:
  Enabled: true
Metrics/AbcSize:
  Enabled: true
  IgnoredMethods:
    - detect_line_tag
Metrics/ClassLength:
  Enabled: true
Metrics/CyclomaticComplexity:
  Enabled: true
  IgnoredMethods:
    - detect_line_tag
    - parse_any
Metrics/MethodLength:
  Enabled: true
  Max: 15
  IgnoredMethods:
    - test_hash_multiline_key_all_cases
    - test_hash_key_line_endings
    - test_array_with_multiple_hash
    - test_custom_class_linked_list
    - test_custom_class_nested
    - detect_line_tag
    - parse_any
Metrics/PerceivedComplexity:
  Enabled: true
  IgnoredMethods:
    - detect_line_tag
Security/IoMethods:
  Enabled: true
Style/ArgumentsForwarding:
  Enabled: true
Style/CollectionCompact:
  Enabled: true
Style/Documentation:
  Enabled: false
Style/DocumentDynamicEvalDefinition:
  Enabled: true
Style/EndlessMethod:
  Enabled: true
Style/FileRead:
  Enabled: true
Style/FileWrite:
  Enabled: true
Style/HashConversion:
  Enabled: true
Style/HashExcept:
  Enabled: true
Style/HashSyntax:
  Enabled: true
  # Hash Value Omission is a ruby 3.1 feature. rubydocs.info is right now on 3.0.2
  EnforcedShorthandSyntax: never
Style/IfWithBooleanLiteralBranches:
  Enabled: true
Style/InPatternThen:
  Enabled: true
Style/MapToHash:
  Enabled: true
Style/MultilineInPatternThen:
  Enabled: true
Style/NegatedIfElseCondition:
  Enabled: true
Style/NestedFileDirname:
  Enabled: true
Style/NilLambda:
  Enabled: true
Style/NumberedParameters:
  Enabled: true
Style/NumberedParametersLimit:
  Enabled: true
Style/OpenStructUse:
  Enabled: true
Style/QuotedSymbols:
  Enabled: true
Style/RedundantArgument:
  Enabled: true
Style/RedundantSelfAssignmentBranch:
  Enabled: true
Style/SelectByRegexp:
  Enabled: true
Style/StringChars:
  Enabled: true
Style/SwapValues:
  Enabled: true


# Rubocop extensions
require:
  - rubocop-rake

# Reference: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
Rake:
  Enabled: true