ozfortress/citadel

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
require: rubocop-rails

Rails:
  Enabled: true
Rails/ApplicationRecord:
  Exclude:
    - 'lib/**/*'
Rails/HelperInstanceVariable:
  # Sometimes useful
  Enabled: false
Bundler/OrderedGems:
  TreatCommentsAsGroupSeparators: true
Layout/LineLength:
  Max: 120
Layout/HashAlignment:
  EnforcedHashRocketStyle: table
  EnforcedColonStyle: table
Metrics/AbcSize:
  Max: 30
Metrics/ClassLength:
  Max: 250
Metrics/ModuleLength:
  Max: 250
Metrics/CyclomaticComplexity:
  Max: 8
Metrics/BlockLength:
  Enabled: false
Metrics/MethodLength:
  Max: 16
Style/Documentation:
  Enabled: false
Style/ModuleFunction:
  Enabled: false
Style/FrozenStringLiteralComment:
  Enabled: false
Style/SymbolArray:
  Enabled: false
Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: comma
Style/FormatString:
  Enabled: false
Style/FormatStringToken:
  EnforcedStyle: template
Style/StringConcatenation:
  Enabled: false
Style/MixinUsage:
  Exclude:
    - 'bin/setup'
    - 'bin/update'
Layout/EmptyLineAfterGuardClause:
  Enabled: false

Naming/MethodParameterName:
  MinNameLength: 2
  AllowedNames:
    - _

# 'old' style
Style/EmptyMethod:
  EnforcedStyle: expanded

Rails/SkipsModelValidations:
  Exclude:
    - 'spec/factories/*'

# None-guard clauses are sometimes clearer
Style/GuardClause:
  Enabled: false

# Doesn't understand algorithms
Style/CombinableLoops:
  Enabled: false
Lint/UnreachableLoop:
  Enabled: false

# This doesn't always make sense
Rails/InverseOf:
  Enabled: false

Rails/HttpPositionalArguments:
  # Broken for
  Exclude:
    - 'spec/requests/api/v1/**/*'

AllCops:
  Exclude:
    - 'db/**/*'
    - 'config/**/*'
    - 'vendor/**/*'
  DisplayCopNames: true
  TargetRubyVersion: 2.5
  TargetRailsVersion: 5.2
  # Enable new cops by default
  NewCops: enable