require: rubocop-thread_safety
#require: rubocop-rspec

inherit_from: .rubocop_todo.yml

AllCops:
  TargetRubyVersion: 1.9
  DisplayCopNames: true
  DisplayStyleGuide: true

Rails:
  Enabled: false

# Allow block comments
Style/BlockComments:
  Enabled: false

# Disable
Style/Documentation:
  Enabled: false

Layout/DotPosition:
  Enabled: true
  EnforcedStyle: leading

Style/FrozenStringLiteralComment:
  Enabled: true
  EnforcedStyle: never

# Recheck this cop later
Style/FlipFlop:
  Description: 'Checks for flip flops'
  StyleGuide: '#no-flip-flops'
  Enabled: true

# Recheck this cop later
Style/RedundantException:
  Description: "Checks for an obsolete RuntimeException argument in raise/fail."
  StyleGuide: '#no-explicit-runtimeerror'
  Enabled: true

# Recheck this cop later
Style/SafeNavigation:
  Description: >-
                  This cop transforms usages of a method call safeguarded by
                  a check for the existance of the object to
                  safe navigation (`&.`).
  Enabled: true

# Recheck this cop later
Style/SignalException:
  Description: 'Checks for proper usage of fail and raise.'
  StyleGuide: '#prefer-raise-over-fail'
  Enabled: true

# Enable with EnforcedStyle is space
Layout/SpaceInsideStringInterpolation:
  EnforcedStyle: space
  Enabled: true

# Enable with EnforcedStyle is single_quotes
Style/StringLiterals:
  EnforcedStyle: single_quotes
  Enabled: true

# Limit lines to 80 characters
Metrics/LineLength:
  Enabled: false

# TimeZone stuff
Rails/TimeZone:
  EnforcedStyle: strict
  Enabled: true

# Identifies possible cases where Active Record save! or related should be used.
Rails/SaveBang:
  Enabled: true

# Suggests the usage of an auto resource cleanup version of a method (if available)
Style/AutoResourceCleanup:
  Enabled: true

# Preferred collection methods
Style/CollectionMethods:
  Enabled: true

# Use UTF-8 as the source file encoding
Style/Encoding:
  Enabled: true

# Use `raise` or `fail` with an explicit exception class and
# message, rather than just a message.
Style/ImplicitRuntimeError:
  Enabled: true

# Avoid chaining a method call on a do...end block
Style/MethodCalledOnDoEndBlock:
  Enabled: true

# Check for a newline after the assignment operator in multi-line assignments
Layout/MultilineAssignmentLayout:
  Enabled: true

# Just ignore order of gems in Gemfile
Bundler/OrderedGems:
  Enabled: false

# Use %i or %I for an array of symbols.
Style/SymbolArray:
  Enabled: false

Style/GuardClause:
  Enabled: false

Style/IfUnlessModifier:
  Enabled: false

Style/ConditionalAssignment:
  Enabled: true
  EnforcedStyle: assign_to_condition

Style/NegatedIf:
  Enabled: false

# rubocop-thread_safety
ThreadSafety:
  Enabled: true

Style/GlobalVars:
  Enabled: true

Style/ClassVars:
  Enabled: true

Style/MutableConstant:
  Enabled: true

# rubocop-rspec
RSpec/NamedSubject:
  Enabled: false

RSpec/ImplicitExpect:
  Enabled: true
  EnforcedStyle: should

RSpec/MessageSpies:
  Enabled: true
  EnforcedStyle: receive