AllCops:
  Exclude:
    # Exclude .gemspec files because they are generally auto-generated
    - '*.gemspec'
    # Exclude vendored folders
    - 'tmp/**/*'
    - 'vendor/**/*'

Lint/AmbiguousRegexpLiteral:
  Enabled: false

# [codesmell]
Metrics/AbcSize:
  Enabled: false
  Exclude:
    - 'spec/**/*_spec.rb'
    - 'test/**/*_test.rb'

# [codesmell]
Metrics/ClassLength:
  Exclude:
    - 'spec/**/*_spec.rb'
    - 'test/**/*_test.rb'

# [codesmell]
Metrics/MethodLength:
  Exclude:
    - 'spec/**/*_spec.rb'
    - 'test/**/*_test.rb'
  Max: 15

# [codesmell]
Metrics/LineLength:
  Enabled: false
  Exclude:
    - 'spec/**/*_spec.rb'
    - 'test/**/*_test.rb'
  Max: 100

# Do not use "and" or "or" in conditionals, but for readability we can use it
# to chain executions. Just beware of operator order.
Style/AndOr:
  EnforcedStyle: conditionals

Style/Documentation:
  Exclude:
    - 'spec/**/*'
    - 'test/**/*'

# Double empty lines are useful to separate conceptually different methods
# in the same class or module.
Style/EmptyLines:
  Enabled: false

# In most cases, a space is nice. Sometimes, it's not.
# Just be consistent with the rest of the surrounding code.
Style/EmptyLinesAroundClassBody:
  Enabled: false

# In most cases, a space is nice. Sometimes, it's not.
# Just be consistent with the rest of the surrounding code.
Style/EmptyLinesAroundModuleBody:
  Enabled: false

# I personally don't care about the format style.
# In most cases I like to use %, but not at the point I want to enforce it
# as a convention in the entire code.
Style/FormatString:
  Enabled: false

# Prefer the latest Hash syntax
Style/HashSyntax:
  Exclude:
    # But Rakefiles generally have some definition like
    #   :default => :test
    # that looks nicer with the old rocket syntax.
    - 'Rakefile'

# Array indentation should be considered like MultilineMethodCallIndentation indentation
# and use 4 spaces instead of 2.
Style/IndentArray:
  IndentationWidth: 4

# Hash indentation should be considered like MultilineMethodCallIndentation indentation
# and use 4 spaces instead of 2.
Style/IndentHash:
  IndentationWidth: 4

# Multi-line differs from standard indentation, they are indented twice.
Style/MultilineMethodCallIndentation:
  EnforcedStyle: indented
  IndentationWidth: 4

# unless is not always cool.
Style/NegatedIf:
  Enabled: false

# There are cases were the inline rescue is ok. We can either downgrade the severity,
# or rely on the developer judgement on a case-by-case basis.
Style/RescueModifier:
  Enabled: false

# Sorry, but using trailing spaces helps readability.
#
#   %w( foo bar )
#
# looks better to me than
#
#   %w( foo bar )
#
Style/SpaceInsidePercentLiteralDelimiters:
  Enabled: false

# Hate It or Love It, I prefer double quotes as this is more consistent
# with several other programming languages and the output of puts and inspect.
Style/StringLiterals:
  EnforcedStyle: double_quotes

# It's nice to be consistent. The trailing comma also allows easy reordering,
# and doesn't cause a diff in Git when you add a line to the bottom.
Style/TrailingCommaInLiteral:
  EnforcedStyleForMultiline: consistent_comma

Style/TrivialAccessors:
  # IgnoreClassMethods because I want to be able to define class-level accessors
  # that sets an instance variable on the metaclass, such as:
  #
  #    def self.default=(value)
  #      @default = value
  #    end
  #
  IgnoreClassMethods: true

Style/WordArray:
  Enabled: false
