|
| 1 | +inherit_from: .rubocop_todo.yml |
| 2 | + |
| 3 | +AllCops: |
| 4 | + Exclude: |
| 5 | + - !ruby/regexp /(vendor|bundle|bin|db)\/.*/ |
| 6 | + DisplayCopNames: true |
| 7 | + DisplayStyleGuide: true |
| 8 | + TargetRubyVersion: 2.2 |
| 9 | + # https://github.com/bbatsov/rubocop/blob/master/manual/caching.md |
| 10 | + # https://github.com/bbatsov/rubocop/blob/e8680418b351491e111a18cf5b453fc07a3c5239/config/default.yml#L60-L77 |
| 11 | + UseCache: true |
| 12 | + CacheRootDirectory: tmp |
| 13 | + |
| 14 | +Rails: |
| 15 | + Enabled: true |
| 16 | + |
| 17 | +Style/NumericPredicate: |
| 18 | + Enabled: false |
| 19 | + |
| 20 | +# Rubocop options don't align with code-style, which allows alias. |
| 21 | +# https://github.com/bbatsov/ruby-style-guide/pull/383 |
| 22 | +# https://github.com/bbatsov/rubocop/issues/1460 |
| 23 | +# see https://github.com/bbatsov/ruby-style-guide#alias-method-lexically |
| 24 | +# vs. https://github.com/bbatsov/ruby-style-guide#alias-method |
| 25 | +Style/Alias: |
| 26 | + Enabled: false |
| 27 | + |
| 28 | +Style/SingleLineBlockParams: |
| 29 | + Enabled: false |
| 30 | + |
| 31 | +# SupportedStyles: line_count_based, semantic, braces_for_chaining |
| 32 | +Style/BlockDelimiters: |
| 33 | + Enabled: true |
| 34 | + EnforcedStyle: line_count_based |
| 35 | + |
| 36 | +Style/MissingElse: |
| 37 | + Enabled: true |
| 38 | + EnforcedStyle: case |
| 39 | + |
| 40 | +Style/EmptyElse: |
| 41 | + EnforcedStyle: empty |
| 42 | + |
| 43 | +Style/AlignParameters: |
| 44 | + EnforcedStyle: with_fixed_indentation |
| 45 | + Enabled: true |
| 46 | + |
| 47 | +Style/AlignHash: |
| 48 | + EnforcedHashRocketStyle: key |
| 49 | + EnforcedColonStyle: key |
| 50 | + EnforcedLastArgumentHashStyle: ignore_implicit |
| 51 | + |
| 52 | +Style/IndentHash: |
| 53 | + EnforcedStyle: consistent |
| 54 | + |
| 55 | +Style/IndentationWidth: |
| 56 | + Width: 2 |
| 57 | + |
| 58 | +Style/MultilineOperationIndentation: |
| 59 | + EnforcedStyle: indented |
| 60 | + |
| 61 | +Style/ClosingParenthesisIndentation: |
| 62 | + Enabled: false |
| 63 | + |
| 64 | +Style/SpaceInsideHashLiteralBraces: |
| 65 | + EnforcedStyle: no_space |
| 66 | + |
| 67 | +Style/FirstParameterIndentation: |
| 68 | + EnforcedStyle: special_for_inner_method_call_in_parentheses |
| 69 | + |
| 70 | +Style/ExtraSpacing: |
| 71 | + Enabled: true |
| 72 | + |
| 73 | +Lint/BlockAlignment: |
| 74 | + Enabled: true |
| 75 | + EnforcedStyleAlignWith: either |
| 76 | + |
| 77 | +Lint/EndAlignment: |
| 78 | + Enabled: true |
| 79 | + |
| 80 | +Style/SpaceAfterColon: |
| 81 | + Enabled: true |
| 82 | + |
| 83 | +Style/SpaceAfterComma: |
| 84 | + Enabled: true |
| 85 | + |
| 86 | +Style/SpaceAfterNot: |
| 87 | + Enabled: true |
| 88 | + |
| 89 | +Style/SpaceAroundEqualsInParameterDefault: |
| 90 | + EnforcedStyle: no_space |
| 91 | + |
| 92 | +Style/SpaceBeforeBlockBraces: |
| 93 | + Enabled: false |
| 94 | + # EnforcedStyle: space |
| 95 | + |
| 96 | +Style/SpaceInsideBlockBraces: |
| 97 | + EnforcedStyle: space |
| 98 | + EnforcedStyleForEmptyBraces: no_space |
| 99 | + # Space between { and |. Overrides EnforcedStyle if there is a conflict. |
| 100 | + SpaceBeforeBlockParameters: true |
| 101 | + |
| 102 | +Style/SpaceInsideBrackets: |
| 103 | + Enabled: true |
| 104 | + |
| 105 | +Style/SpaceInsideParens: |
| 106 | + Enabled: true |
| 107 | + |
| 108 | +Style/EmptyLines: |
| 109 | + Enabled: true |
| 110 | + |
| 111 | +Style/EmptyLinesAroundAccessModifier: |
| 112 | + Enabled: true |
| 113 | + |
| 114 | +Style/EmptyLinesAroundBlockBody: |
| 115 | + EnforcedStyle: no_empty_lines |
| 116 | + |
| 117 | +Style/EmptyLinesAroundClassBody: |
| 118 | + EnforcedStyle: no_empty_lines |
| 119 | + |
| 120 | +Style/EmptyLinesAroundModuleBody: |
| 121 | + EnforcedStyle: no_empty_lines |
| 122 | + |
| 123 | +Style/EmptyLinesAroundMethodBody: |
| 124 | + Enabled: true |
| 125 | + |
| 126 | +Style/EmptyLineBetweenDefs: |
| 127 | + Enabled: true |
| 128 | + |
| 129 | +Style/LeadingCommentSpace: |
| 130 | + Enabled: true |
| 131 | + |
| 132 | +Style/TrailingCommaInLiteral: |
| 133 | + EnforcedStyleForMultiline: no_comma |
| 134 | + |
| 135 | +Style/TrailingCommaInArguments: |
| 136 | + EnforcedStyleForMultiline: no_comma |
| 137 | + |
| 138 | +Style/TrailingWhitespace: |
| 139 | + Enabled: true |
| 140 | + |
| 141 | +Style/PercentLiteralDelimiters: |
| 142 | + PreferredDelimiters: |
| 143 | + '%': '{}' |
| 144 | + '%i': () |
| 145 | + '%q': () |
| 146 | + '%Q': () |
| 147 | + '%r': '{}' |
| 148 | + '%s': () |
| 149 | + '%w': () |
| 150 | + '%W': () |
| 151 | + '%x': () |
| 152 | + |
| 153 | +Style/StringLiterals: |
| 154 | + # EnforcedStyle: single_quotes |
| 155 | + Enabled: false |
| 156 | + |
| 157 | +Style/StringLiteralsInInterpolation: |
| 158 | + # EnforcedStyle: single_quotes |
| 159 | + Enabled: false |
| 160 | + |
| 161 | +Style/RegexpLiteral: |
| 162 | + Enabled: false |
| 163 | + |
| 164 | +Lint/AssignmentInCondition: |
| 165 | + # AllowSafeAssignment: true |
| 166 | + # accepts = in condition surrounded with braces, e.g. if (test = 10) |
| 167 | + # accepts []= in condition surrounded with braces, e.g. if (test[0] = 10) |
| 168 | + Enabled: true |
| 169 | + |
| 170 | +Style/VariableNumber: |
| 171 | + Enabled: false |
| 172 | + |
| 173 | +Rails/HttpPositionalArguments: |
| 174 | + Enabled: false |
| 175 | + |
| 176 | +Style/IndentArray: |
| 177 | + EnforcedStyle: consistent |
| 178 | + |
| 179 | +Style/NumericLiterals: |
| 180 | + Enabled: false |
| 181 | + |
| 182 | +Style/Documentation: |
| 183 | + Enabled: false |
| 184 | + |
| 185 | +Style/SpaceInLambdaLiteral: |
| 186 | + EnforcedStyle: require_no_space |
| 187 | + |
| 188 | +Style/DoubleNegation: |
| 189 | + Enabled: false |
| 190 | + |
| 191 | +Metrics/LineLength: |
| 192 | + Max: 100 |
0 commit comments