|
1 |
| -inherit_from: .rubocop_rspec_base.yml |
| 1 | +inherit_from: |
| 2 | + - .rubocop_todo.yml |
2 | 3 |
|
3 |
| -# Over time we'd like to get this down, but this is what we're at now. |
4 |
| -LineLength: |
5 |
| - Max: 186 |
| 4 | +AllCops: |
| 5 | + Exclude: |
| 6 | + # Templates are really ERB which Rubocop does not parse |
| 7 | + - 'lib/generators/rspec/*/templates/**/*' |
| 8 | + |
| 9 | +Layout/AccessModifierIndentation: |
| 10 | + Enabled: false |
| 11 | + |
| 12 | +Layout/AssignmentIndentation: |
| 13 | + Enabled: false |
| 14 | + |
| 15 | +Layout/ClosingParenthesisIndentation: |
| 16 | + Enabled: false |
| 17 | + |
| 18 | +Layout/EmptyLineAfterMagicComment: |
| 19 | + Enabled: false |
6 | 20 |
|
7 |
| -# Over time we'd like to get this down, but this is what we're at now. |
8 |
| -MethodLength: |
9 |
| - Max: 50 |
| 21 | +Layout/EmptyLineBetweenDefs: |
| 22 | + Enabled: false |
| 23 | + |
| 24 | +Layout/EmptyLinesAroundAccessModifier: |
| 25 | + Enabled: false |
| 26 | + |
| 27 | +Layout/EmptyLinesAroundBlockBody: |
| 28 | + Enabled: false |
| 29 | + |
| 30 | +Layout/ExtraSpacing: |
| 31 | + Enabled: false |
| 32 | + |
| 33 | +Layout/FirstArgumentIndentation: |
| 34 | + Enabled: false |
| 35 | + |
| 36 | +Layout/FirstArrayElementIndentation: |
| 37 | + Enabled: false |
| 38 | + |
| 39 | +Layout/HashAlignment: |
| 40 | + Enabled: false |
| 41 | + |
| 42 | +Layout/HeredocIndentation: |
| 43 | + Enabled: false |
| 44 | + |
| 45 | +Layout/MultilineMethodCallBraceLayout: |
| 46 | + Enabled: false |
| 47 | + |
| 48 | +Layout/MultilineMethodCallIndentation: |
| 49 | + Enabled: false |
| 50 | + |
| 51 | +Layout/MultilineOperationIndentation: |
| 52 | + Enabled: false |
| 53 | + |
| 54 | +Layout/ParameterAlignment: |
| 55 | + EnforcedStyle: with_first_parameter |
| 56 | + |
| 57 | +Layout/SpaceInsidePercentLiteralDelimiters: |
| 58 | + Enabled: false |
10 | 59 |
|
11 | 60 | # We use spaces, so it's less of a change to stick with that.
|
12 |
| -SpaceAroundEqualsInParameterDefault: |
| 61 | +Layout/SpaceAroundEqualsInParameterDefault: |
13 | 62 | EnforcedStyle: space
|
14 | 63 |
|
15 |
| -################################################################################ |
16 |
| -# Individual File Exclusions |
17 |
| -################################################################################ |
| 64 | +Layout/SpaceAroundBlockParameters: |
| 65 | + Enabled: false |
18 | 66 |
|
19 |
| -AllCops: |
20 |
| - Exclude: |
21 |
| - # Templates are really ERB which Rubocop does not parse |
22 |
| - - 'lib/generators/rspec/*/templates/**/*' |
| 67 | +Layout/SpaceAroundOperators: |
| 68 | + Enabled: false |
23 | 69 |
|
24 |
| -FileName: |
25 |
| - Exclude: |
26 |
| - # We break convention here so that when bundler requires the gem, which |
27 |
| - # uses the gem name, things work without user configuration. |
28 |
| - - lib/rspec-rails.rb |
| 70 | +Layout/SpaceBeforeComma: |
| 71 | + Enabled: false |
29 | 72 |
|
30 |
| -HandleExceptions: |
| 73 | +Layout/SpaceInsideStringInterpolation: |
| 74 | + Enabled: false |
| 75 | + |
| 76 | +Lint/AssignmentInCondition: |
| 77 | + Enabled: false |
| 78 | + |
| 79 | +Lint/EmptyExpression: |
| 80 | + Enabled: false |
| 81 | + |
| 82 | +Lint/ImplicitStringConcatenation: |
| 83 | + Enabled: false |
| 84 | + |
| 85 | +Lint/NestedMethodDefinition: |
| 86 | + Enabled: false |
| 87 | + |
| 88 | +# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue` |
| 89 | +Lint/RescueException: |
| 90 | + Enabled: true |
| 91 | + |
| 92 | +Lint/SuppressedException: |
31 | 93 | Exclude:
|
32 | 94 | # RSpec is tightly coupled to capybara right now, this should be
|
33 | 95 | # re-evaluted in the future. For now we allow the empty rescue
|
34 | 96 | - lib/rspec/rails/vendor/capybara.rb
|
35 | 97 |
|
36 |
| -IfUnlessModifier: |
| 98 | +Metrics/AbcSize: |
| 99 | + Enabled: false |
| 100 | + |
| 101 | +Metrics/BlockLength: |
| 102 | + Enabled: false |
| 103 | + |
| 104 | +# Warns when the class is excessively long. |
| 105 | +Metrics/ClassLength: |
| 106 | + Max: 100 |
| 107 | + |
| 108 | +Metrics/PerceivedComplexity: |
| 109 | + Enabled: false |
| 110 | + |
| 111 | +# Who cares what we call the argument for binary operator methods? |
| 112 | +Naming/BinaryOperatorParameterName: |
| 113 | + Enabled: false |
| 114 | + |
| 115 | +Naming/ConstantName: |
| 116 | + Enabled: false |
| 117 | + |
| 118 | +Naming/FileName: |
37 | 119 | Exclude:
|
38 |
| - # Allow single line statement as the style matches the remainder of the file |
39 |
| - - lib/rspec/rails/vendor/capybara.rb |
| 120 | + # We break convention here so that when bundler requires the gem, which |
| 121 | + # uses the gem name, things work without user configuration. |
| 122 | + - lib/rspec-rails.rb |
| 123 | + |
| 124 | +Naming/HeredocDelimiterNaming: |
| 125 | + Enabled: false |
| 126 | + |
| 127 | +Naming/MemoizedInstanceVariableName: |
| 128 | + Enabled: false |
40 | 129 |
|
41 |
| -PerlBackrefs: |
| 130 | +Naming/MethodParameterName: |
| 131 | + Enabled: false |
| 132 | + |
| 133 | +# We have too many special cases where we allow generator methods or prefer a |
| 134 | +# prefixed predicate due to it's improved readability. |
| 135 | +Naming/PredicateName: |
| 136 | + Enabled: false |
| 137 | + |
| 138 | +Naming/RescuedExceptionsVariableName: |
| 139 | + Enabled: false |
| 140 | + |
| 141 | +Naming/VariableNumber: |
| 142 | + Enabled: false |
| 143 | + |
| 144 | +Style/CollectionMethods: |
| 145 | + PreferredMethods: |
| 146 | + reduce: 'inject' |
| 147 | + |
| 148 | +Style/AccessModifierDeclarations: |
| 149 | + Enabled: false |
| 150 | + |
| 151 | +# "Use alias_method instead of alias" |
| 152 | +# We're fine with `alias`. |
| 153 | +Style/Alias: |
| 154 | + Enabled: false |
| 155 | + |
| 156 | +Style/BlockDelimiters: |
| 157 | + Enabled: false |
| 158 | + |
| 159 | +# "Avoid the use of the case equality operator ===" |
| 160 | +# We prefer using `Class#===` over `Object#is_a?` because `Class#===` |
| 161 | +# is less likely to be monkey patched than `is_a?` on a user object. |
| 162 | +Style/CaseEquality: |
| 163 | + Enabled: false |
| 164 | + |
| 165 | +Style/ClassCheck: |
| 166 | + Enabled: false |
| 167 | + |
| 168 | +Style/ConditionalAssignment: |
| 169 | + Enabled: false |
| 170 | + |
| 171 | +Style/DateTime: |
| 172 | + Enabled: false |
| 173 | + |
| 174 | +# We use YARD to enforce documentation. It works better than rubocop's |
| 175 | +# enforcement...rubocop complains about the places we re-open |
| 176 | +# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments. |
| 177 | +Style/Documentation: |
| 178 | + Enabled: false |
| 179 | + |
| 180 | +Style/DoubleNegation: |
| 181 | + Enabled: false |
| 182 | + |
| 183 | +Style/EmptyMethod: |
| 184 | + Enabled: false |
| 185 | + |
| 186 | +Style/EmptyCaseCondition: |
| 187 | + Enabled: false |
| 188 | + |
| 189 | +Style/EmptyElse: |
| 190 | + Enabled: false |
| 191 | + |
| 192 | +Style/FormatString: |
| 193 | + EnforcedStyle: percent |
| 194 | + |
| 195 | +Style/FormatStringToken: |
| 196 | + Enabled: false |
| 197 | + |
| 198 | +Style/FrozenStringLiteralComment: |
| 199 | + Enabled: false |
| 200 | + |
| 201 | +Style/GuardClause: |
| 202 | + Enabled: false |
| 203 | + |
| 204 | +Style/IdenticalConditionalBranches: |
| 205 | + Enabled: false |
| 206 | + |
| 207 | +Style/IfUnlessModifierOfIfUnless: |
| 208 | + Enabled: false |
| 209 | + |
| 210 | +Style/IfInsideElse: |
| 211 | + Enabled: false |
| 212 | + |
| 213 | +Style/IfUnlessModifier: |
| 214 | + Enabled: false |
| 215 | + |
| 216 | +Style/MethodMissingSuper: |
| 217 | + Enabled: false |
| 218 | + |
| 219 | +Style/MissingRespondToMissing: |
| 220 | + Enabled: false |
| 221 | + |
| 222 | +Style/MixinUsage: |
| 223 | + Enabled: false |
| 224 | + |
| 225 | +Style/MultilineIfModifier: |
| 226 | + Enabled: false |
| 227 | + |
| 228 | +Style/MultipleComparison: |
| 229 | + Enabled: false |
| 230 | + |
| 231 | +Style/MutableConstant: |
| 232 | + Enabled: false |
| 233 | + |
| 234 | +Style/NestedModifier: |
| 235 | + Enabled: false |
| 236 | + |
| 237 | +Style/NestedParenthesizedCalls: |
| 238 | + Enabled: false |
| 239 | + |
| 240 | +Style/NumericPredicate: |
| 241 | + Enabled: false |
| 242 | + |
| 243 | +Style/ParallelAssignment: |
| 244 | + Enabled: false |
| 245 | + |
| 246 | +Style/ParenthesesAroundCondition: |
| 247 | + Enabled: false |
| 248 | + |
| 249 | +Style/PerlBackrefs: |
42 | 250 | Exclude:
|
43 | 251 | # We probably can refactor the backref out, but for now excluding it since
|
44 | 252 | # we can't use named matches in 1.8.7
|
45 | 253 | - lib/generators/rspec/scaffold/scaffold_generator.rb
|
46 | 254 |
|
47 |
| -Style/AccessModifierDeclarations: |
| 255 | +Style/PercentLiteralDelimiters: |
| 256 | + PreferredDelimiters: |
| 257 | + '%': () # double-quoted string |
| 258 | + '%i': '[]' # array of symbols |
| 259 | + '%q': () # single-quoted string |
| 260 | + '%Q': () # double-quoted string |
| 261 | + '%r': '{}' # regular expression pattern |
| 262 | + '%s': () # a symbol |
| 263 | + '%w': '[]' # array of single-quoted strings |
| 264 | + '%W': '[]' # array of double-quoted strings |
| 265 | + '%x': () # a shell command as a string |
| 266 | + |
| 267 | +# On 1.8 `proc` was `lambda`, so we used `Proc.new` to ensure we got real procs |
| 268 | +# on all supported versions. |
| 269 | +# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/ |
| 270 | +Style/Proc: |
48 | 271 | Enabled: false
|
49 | 272 |
|
50 |
| -Naming/MemoizedInstanceVariableName: |
| 273 | +Style/RegexpLiteral: |
51 | 274 | Enabled: false
|
52 | 275 |
|
53 |
| -Naming/UncommunicativeMethodParamName: |
| 276 | +Style/RedundantReturn: |
54 | 277 | Enabled: false
|
55 | 278 |
|
56 |
| -Metrics/PerceivedComplexity: |
| 279 | +Style/RedundantParentheses: |
57 | 280 | Enabled: false
|
58 | 281 |
|
59 |
| -Metrics/BlockLength: |
| 282 | +Style/RescueStandardError: |
60 | 283 | Enabled: false
|
61 | 284 |
|
62 |
| -Lint/AssignmentInCondition: |
| 285 | +# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention. |
| 286 | +Style/SignalException: |
63 | 287 | Enabled: false
|
64 | 288 |
|
65 |
| -Lint/EmptyExpression: |
| 289 | +# This rule favors constant names from the English standard library which we don't load. |
| 290 | +Style/SpecialGlobalVars: |
66 | 291 | Enabled: false
|
67 | 292 |
|
68 |
| -Layout/AlignHash: |
| 293 | +Style/StderrPuts: |
69 | 294 | Enabled: false
|
70 | 295 |
|
71 |
| -Naming/RescuedExceptionsVariableName: |
| 296 | +Style/StringLiteralsInInterpolation: |
| 297 | + Enabled: false |
| 298 | + |
| 299 | +Style/StructInheritance: |
| 300 | + Enabled: false |
| 301 | + |
| 302 | +# We don't care about single vs double qoutes. |
| 303 | +Style/StringLiterals: |
| 304 | + Enabled: false |
| 305 | + |
| 306 | +Style/SymbolArray: |
| 307 | + Enabled: false |
| 308 | + |
| 309 | +Style/SymbolProc: |
| 310 | + Enabled: false |
| 311 | + |
| 312 | +Style/TernaryParentheses: |
| 313 | + Enabled: false |
| 314 | + |
| 315 | +Style/TrailingCommaInArrayLiteral: |
| 316 | + Enabled: false |
| 317 | + |
| 318 | +Style/TrailingCommaInHashLiteral: |
| 319 | + Enabled: false |
| 320 | + |
| 321 | +Style/TrailingCommaInArguments: |
| 322 | + Enabled: false |
| 323 | + |
| 324 | +Style/TrivialAccessors: |
| 325 | + AllowDSLWriters: true |
| 326 | + AllowPredicates: true |
| 327 | + ExactNameMatch: true |
| 328 | + |
| 329 | +Style/TrailingUnderscoreVariable: |
| 330 | + Enabled: false |
| 331 | + |
| 332 | +Style/YodaCondition: |
| 333 | + Enabled: false |
| 334 | + |
| 335 | +Style/ZeroLengthPredicate: |
72 | 336 | Enabled: false
|
0 commit comments