enkessler/cuke_slicer

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
AllCops:
  TargetRubyVersion: 2.0

# Cops that are being modified because whitespace helps with readability
Layout/CaseIndentation:
  Enabled: false
Layout/EmptyLinesAroundModuleBody:
  Enabled: false
Layout/EmptyLinesAroundClassBody:
  EnforcedStyle: empty_lines
  Exclude:
    - 'testing/rspec/spec/**/*' # Random fake/monkey patch classes for tests don't need a bunch of white space
Layout/EmptyLines:
  Enabled: false
Layout/EmptyLinesAroundBlockBody:
  Enabled: false

# More readability
Naming/VariableNumber:
  EnforcedStyle: snake_case


# No, I like immediately knowing that something is a set of mutually exclusive
# paths because it is a `case` statement rather than having to parse `if/else` logic
Style/EmptyCaseCondition:
  Enabled: false

# Most people will be looking at the code in a text editor, not a terminal
Metrics/LineLength:
  Max: 120

# The test code is safe to evaluate
Security/Eval:
  Exclude:
    - 'testing/**/*'

Metrics/BlockLength:
  Exclude:
    - 'testing/rspec/spec/**/*' # RSpec suites are inherently a bunch of large, nested blocks
    - 'cuke_slicer.gemspec'     # As is a gemspec
    - 'rakefiles/**/*'          # As are Rake namespaces

# Still within understanding as long as other complexity cops aren't triggering
Metrics/MethodLength:
  Max: 15

Style/Documentation:
  Exclude:
    - 'testing/rspec/spec/**/*' # Random fake/monkey patch classes for tests don't need documentation

# Non-specific exception handling is fine
Lint/RescueWithoutErrorClass:
  Enabled: false