inherit_from: - .rubocop_todo.yml require: - rubocop-rspec ################################################################################ AllCops: DisplayCopNames: true TargetRubyVersion: 2.4 Exclude: - "gemfiles/*" ## Layout ###################################################################### Layout/ArgumentAlignment: EnforcedStyle: with_fixed_indentation Layout/FirstArrayElementIndentation: EnforcedStyle: consistent Layout/FirstHashElementIndentation: EnforcedStyle: consistent Layout/HashAlignment: EnforcedHashRocketStyle: table Layout/LineLength: Max: 100 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Layout/ParameterAlignment: EnforcedStyle: with_fixed_indentation Layout/SpaceAroundMethodCallOperator: Enabled: true Layout/SpaceInLambdaLiteral: EnforcedStyle: require_space ## Lint ######################################################################## Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true ## Metrics ##################################################################### Metrics/BlockLength: Exclude: - "Guardfile" - "spec/**/*" ## Styles ###################################################################### Style/Documentation: Enabled: false Style/ExponentialNotation: Enabled: true Style/HashEachMethods: Enabled: true Style/HashSyntax: EnforcedStyle: hash_rockets Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true # Follow your heart where it makes sense to use lambda or lambda literal. # Enforcing it makes some pieces of code look REALLY terrible, e.g. in # case of empty (noop) lambdas: `lambda { |_| }`. Style/Lambda: Enabled: false # Enabling this cop makes Guardfile (which is full of pathname regexps) # look absolutley style-inconsistent and terrible. In any case, this should # be on developer's choice whenever to use `%r` or not. Just like we don't # enforce to use `["foo"]` over `%w(foo)` and so on. Style/RegexpLiteral: Enabled: false Style/RescueStandardError: EnforcedStyle: implicit Style/StringLiterals: EnforcedStyle: double_quotes # I prefer Yoda style instead, but there's no such enforcement style. Style/YodaCondition: Enabled: false