railsadminteam/rails_admin

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
inherit_from: .rubocop_todo.yml

require:
  - rubocop-performance

AllCops:
  Exclude:
    - "gemfiles/*"
    - "node_modules/**/*"
    - "spec/dummy_app/bin/**/*"
    - "spec/dummy_app/db/schema.rb"
    - "spec/dummy_app/node_modules/**/*"
    - "spec/dummy_app/tmp/**/*"
    - "vendor/bundle/**/*"
  NewCops: disable
  SuggestExtensions: false
  TargetRubyVersion: 2.6

Gemspec/DeprecatedAttributeAssignment:
  Enabled: true

Layout/AccessModifierIndentation:
  EnforcedStyle: outdent

Layout/DotPosition:
  EnforcedStyle: trailing

Layout/LineEndStringConcatenationIndentation:
  Enabled: true

Layout/LineLength:
  AllowURI: true
  Enabled: false

Layout/MultilineAssignmentLayout:
  Enabled: true
  SupportedTypes: [case, if]

Layout/SpaceBeforeBrackets:
  Enabled: true

Layout/SpaceInsideHashLiteralBraces:
  EnforcedStyle: no_space

Lint/AmbiguousAssignment:
  Enabled: true

Lint/AmbiguousRange:
  Enabled: true

Lint/DeprecatedConstants:
  Enabled: true

Lint/DuplicateBranch:
  Enabled: true
  IgnoreLiteralBranches: true

Lint/DuplicateRegexpCharacterClassElement:
  Enabled: true

Lint/EmptyBlock:
  Enabled: true
  Exclude:
    - "spec/**/*"

Lint/EmptyClass:
  Enabled: true
  Exclude:
    - "spec/**/*"

Lint/EmptyInPattern:
  Enabled: true

Lint/LambdaWithoutLiteralBlock:
  Enabled: true

Lint/NoReturnInBeginEndBlocks:
  Enabled: true

Lint/NumberedParameterAssignment:
  Enabled: true

Lint/OrAssignmentToConstant:
  Enabled: true

Lint/RedundantDirGlobSort:
  Enabled: true

Lint/SymbolConversion:
  Enabled: true

Lint/ToEnumArguments:
  Enabled: true

Lint/TripleQuotes:
  Enabled: true

Lint/UnexpectedBlockArity:
  Enabled: true

Lint/UnmodifiedReduceAccumulator:
  Enabled: true

Metrics/AbcSize:
  Max: 69.98 # TODO: Lower to 15

Metrics/BlockNesting:
  Max: 3

Metrics/ClassLength:
  CountComments: false
  Max: 200 # TODO: Lower to 100

Metrics/CyclomaticComplexity:
  Max: 15 # TODO: Lower to 6

Metrics/MethodLength:
  CountComments: false
  Max: 29 # TODO: Lower to 15

Metrics/ModuleLength:
  Max: 219 # TODO: Lower to 100

Metrics/ParameterLists:
  Max: 8 # TODO: Lower to 4
  CountKeywordArgs: true

Metrics/PerceivedComplexity:
  Max: 17 # TODO: Lower to 7

Naming/FileName:
  Exclude:
    - "lib/rails_admin/bootstrap-sass.rb"

Naming/InclusiveLanguage:
  Enabled: true

Style/Alias:
  Enabled: false

Style/ArgumentsForwarding:
  Enabled: true

Style/CollectionCompact:
  Enabled: true

Style/CollectionMethods:
  PreferredMethods:
    map: "collect"
    reduce: "inject"
    find: "detect"
    find_all: "select"

Style/Documentation:
  Enabled: false

Style/DocumentDynamicEvalDefinition:
  Enabled: false

Style/DoubleNegation:
  Enabled: false

Style/EachWithObject:
  Enabled: false

Style/EndlessMethod:
  Enabled: true

Style/HashConversion:
  Enabled: true

Style/HashExcept:
  Enabled: true

Style/IfWithBooleanLiteralBranches:
  Enabled: true

Style/InPatternThen:
  Enabled: true

Style/Lambda:
  Enabled: false

Style/MultilineInPatternThen:
  Enabled: true

Style/NegatedIfElseCondition:
  Enabled: true

Style/NumericPredicate:
  Enabled: false

Style/NilLambda:
  Enabled: true

Style/QuotedSymbols:
  Enabled: true

Style/RaiseArgs:
  EnforcedStyle: compact

Style/RedundantArgument:
  Enabled: true

Style/RedundantParentheses:
  Enabled: false

Style/RedundantSelfAssignmentBranch:
  Enabled: true

Style/StringChars:
  Enabled: true

Style/SwapValues:
  Enabled: true

Style/TrailingCommaInArguments:
  EnforcedStyleForMultiline: "comma"

Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: "comma"

Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: "comma"