inherit_from: .rubocop_todo.yml AllCops: Exclude: - !ruby/regexp /(vendor|bundle|bin|db)\/.*/ DisplayCopNames: true DisplayStyleGuide: true TargetRubyVersion: 2.4 TargetRailsVersion: 4.2 # https://github.com/bbatsov/rubocop/blob/master/manual/caching.md # https://github.com/bbatsov/rubocop/blob/e8680418b351491e111a18cf5b453fc07a3c5239/config/default.yml#L60-L77 UseCache: true CacheRootDirectory: tmp Rails: Enabled: true Style/NumericPredicate: Enabled: false # Rubocop options don't align with code-style, which allows alias. # https://github.com/bbatsov/ruby-style-guide/pull/383 # https://github.com/bbatsov/rubocop/issues/1460 # see https://github.com/bbatsov/ruby-style-guide#alias-method-lexically # vs. https://github.com/bbatsov/ruby-style-guide#alias-method Style/Alias: Enabled: false Style/SingleLineBlockParams: Enabled: false # SupportedStyles: line_count_based, semantic, braces_for_chaining Style/BlockDelimiters: Enabled: true EnforcedStyle: line_count_based Style/MissingElse: Enabled: true EnforcedStyle: case Style/EmptyElse: EnforcedStyle: empty Lint/BlockAlignment: Enabled: true EnforcedStyleAlignWith: either Lint/EndAlignment: Enabled: true Style/TrailingCommaInLiteral: EnforcedStyleForMultiline: no_comma Style/TrailingCommaInArguments: EnforcedStyleForMultiline: no_comma Style/PercentLiteralDelimiters: PreferredDelimiters: '%': '{}' '%i': () '%q': () '%Q': () '%r': '{}' '%s': () '%w': () '%W': () '%x': () Style/StringLiterals: # EnforcedStyle: single_quotes Enabled: false Style/StringLiteralsInInterpolation: # EnforcedStyle: single_quotes Enabled: false Style/RegexpLiteral: Enabled: false Lint/AssignmentInCondition: # AllowSafeAssignment: true # accepts = in condition surrounded with braces, e.g. if (test = 10) # accepts []= in condition surrounded with braces, e.g. if (test[0] = 10) Enabled: true Style/VariableNumber: Enabled: false Rails/HttpPositionalArguments: Enabled: false Rails/Blank: Enabled: false Style/NumericLiterals: Enabled: false Style/Documentation: Enabled: false Style/DoubleNegation: Enabled: false Layout/IndentArray: EnforcedStyle: consistent Layout/SpaceInLambdaLiteral: EnforcedStyle: require_no_space Layout/AlignParameters: EnforcedStyle: with_fixed_indentation Enabled: true Layout/AlignHash: EnforcedHashRocketStyle: key EnforcedColonStyle: key EnforcedLastArgumentHashStyle: ignore_implicit Layout/IndentHash: EnforcedStyle: consistent Layout/IndentationWidth: Width: 2 Layout/MultilineOperationIndentation: EnforcedStyle: indented Layout/ClosingParenthesisIndentation: Enabled: false Layout/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space Layout/FirstParameterIndentation: EnforcedStyle: special_for_inner_method_call_in_parentheses Layout/ExtraSpacing: Enabled: true Layout/SpaceAfterColon: Enabled: true Layout/SpaceAfterComma: Enabled: true Layout/SpaceAfterNot: Enabled: true Layout/SpaceAroundEqualsInParameterDefault: EnforcedStyle: no_space Layout/SpaceBeforeBlockBraces: Enabled: false # EnforcedStyle: space Layout/SpaceInsideBlockBraces: EnforcedStyle: space EnforcedStyleForEmptyBraces: no_space # Space between { and |. Overrides EnforcedStyle if there is a conflict. SpaceBeforeBlockParameters: true Layout/SpaceInsideBrackets: Enabled: true Layout/SpaceInsideParens: Enabled: true Layout/EmptyLines: Enabled: true Layout/EmptyLinesAroundAccessModifier: Enabled: true Layout/EmptyLinesAroundBlockBody: EnforcedStyle: no_empty_lines Layout/EmptyLinesAroundClassBody: EnforcedStyle: no_empty_lines Layout/EmptyLinesAroundModuleBody: EnforcedStyle: no_empty_lines Layout/EmptyLinesAroundMethodBody: Enabled: true Layout/EmptyLineBetweenDefs: Enabled: true Layout/LeadingCommentSpace: Enabled: true Layout/TrailingWhitespace: Enabled: true