.rubocop.yml

Summary

Maintainability
Test Coverage
AllCops:
  Exclude:
    - 'pkg/**/*'
    - 'vendor/**/*'
    - 'bench/**/*'

Lint/AmbiguousRegexpLiteral:
  Enabled: false

Lint/AmbiguousOperator:
  Enabled: false

Lint/AssignmentInCondition:
  Enabled: false

Metrics/AbcSize:
  Enabled: false

Metrics/ClassLength:
  Enabled: false

Metrics/CyclomaticComplexity:
  Enabled: false

# FIXME: lower by fixing the biggest offenders
Metrics/LineLength:
  Max: 184

Metrics/MethodLength:
  Enabled: false

Metrics/PerceivedComplexity:
  Enabled: false

# def_delegators’ first symbol is the target, the rest are calls
Style/AlignParameters:
  Enabled: false

# FIXME: should this be normalised to `EnforcedStyle: semantic`?
Style/BlockDelimiters:
  Enabled: false

# including parametrised modules looks much better without this alignment
Style/ClosingParenthesisIndentation:
  Enabled: false

Style/ConstantName:
  Exclude:
    - yaks/lib/yaks/breaking_changes.rb

Style/Documentation:
  Enabled: false

Style/EmptyLineBetweenDefs:
  AllowAdjacentOneLineDefs: true

Style/FileName:
  Exclude:
    - yaks-html/lib/yaks-html.rb
    - yaks-sinatra/lib/yaks-sinatra.rb
    - yaks-transit/lib/yaks-transit.rb

# including parametrised modules looks much better without this indentation
Style/FirstParameterIndentation:
  Enabled: false

Style/FormatString:
  EnforcedStyle: percent

Style/GlobalVars:
  Exclude:
    - bench/bench.rb
    - bench/bench_1000.rb

Style/HashSyntax:
  Exclude:
    - Rakefile

# some arrays need deeper indenting for readability
Style/IndentArray:
  Enabled: false

Style/IndentationWidth:
  Exclude:
    - yaks/lib/yaks/breaking_changes.rb

# the codebase uses -> consistently
Style/Lambda:
  Enabled: false

# FIXME: figure out why fixing this blows tests up
Style/MethodCallParentheses:
  Enabled: false

Style/ModuleFunction:
  Exclude:
    - yaks/lib/yaks/util.rb

Style/MultilineBlockChain:
  Enabled: false

Style/PercentLiteralDelimiters:
  Exclude:
    - yaks/lib/yaks/breaking_changes.rb
    - yaks/spec/unit/yaks/config_spec.rb
  PreferredDelimiters:
    '%i': '[]'
    '%w': '[]'
    '%W': '[]'

Style/PerlBackrefs:
  Enabled: false

Style/Semicolon:
  AllowAsExpressionSeparator: true

Style/SignalException:
  EnforcedStyle: only_raise

Style/SpaceBeforeSemicolon:
  Enabled: false

# FIXME: this should be enforced to either space or no_space
Style/SpaceBeforeBlockBraces:
  Enabled: false

# FIXME: this should be enforced to either space or no_space
Style/SpaceInsideBlockBraces:
  Enabled: false

# FIXME: make a call whether to fix this one or not
Style/SpaceInsideBrackets:
  Enabled: false

Style/SpaceInsideHashLiteralBraces:
  EnforcedStyle: no_space

Style/SpaceInsideStringInterpolation:
  Enabled: false

# FIXME: enforce either single_quotes (fewer fixes) or double_quotes
Style/StringLiterals:
  Enabled: false

Style/UnneededPercentQ:
  Exclude:
    - yaks/lib/yaks/breaking_changes.rb

Style/TrailingComma:
  Enabled: false

# Allow redundant braces in foo.bar({"qux" => "quz"}), when writing
# e.g. JSON tests this can be more explicit and clear
Style/BracesAroundHashParameters:
  Exclude:
    - yaks/spec/**/*

Style/SpaceInsideStringInterpolation:
  Enabled: false

Style/LambdaCall:
  Enabled: false