inherit_from: .rubocop_todo.yml require: - rubocop-performance - rubocop-rspec AllCops: Exclude: - 'tmp/**/*' NewCops: enable TargetRubyVersion: 2.5 # Be lenient with line length Layout/LineLength: Max: 92 # Don't force lonely closing parentheses Layout/MultilineMethodCallBraceLayout: EnforcedStyle: same_line # Multi-line method calls should be simply indented. Aligning them makes it # even harder to keep a sane line length. Layout/MultilineMethodCallIndentation: EnforcedStyle: indented # Multi-line assignment should be simply indented. Aligning them makes it even # harder to keep a sane line length. Layout/MultilineOperationIndentation: EnforcedStyle: indented # Force consistent spacing independent of block contents Layout/SpaceBeforeBlockBraces: EnforcedStyleForEmptyBraces: space # Assume the programmer knows how bracketed block syntax works Lint/AmbiguousBlockAssociation: Enabled: false # Allow if (foo = get_foo) style Lint/AssignmentInCondition: AllowSafeAssignment: true # Spec describe blocks can be any size Metrics/BlockLength: Exclude: - 'spec/**/*' Performance/StartWith: AutoCorrect: true # Allow and/or for control flow only Style/AndOr: EnforcedStyle: conditionals # Require at least two dependent lines before suggesting a guard clause Style/GuardClause: MinBodyLength: 2 # Sometimes an if statement just looks better than next with a guard clause Style/Next: Enabled: false # Explicite numbers are often clearer, and more robust. Style/NumericPredicate: Enabled: false # Use older RuboCop default Style/PercentLiteralDelimiters: PreferredDelimiters: '%W': () '%w': () # Allow explicit return with multiple return values Style/RedundantReturn: AllowMultipleReturnValues: true # Do not commit to use of interpolation Style/StringLiterals: EnforcedStyle: double_quotes # Prefer symbols to look like symbols Style/SymbolArray: EnforcedStyle: brackets # Accessors are only trivial if they match the ivar name Style/TrivialAccessors: ExactNameMatch: true