|
1 | 1 | inherit_from:
|
2 | 2 | - .rubocop_todo.yml
|
3 |
| - - .rubocop_rspec_base.yml |
| 3 | + |
| 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 |
| 20 | + |
| 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 |
4 | 59 |
|
5 | 60 | # We use spaces, so it's less of a change to stick with that.
|
6 | 61 | Layout/SpaceAroundEqualsInParameterDefault:
|
7 | 62 | EnforcedStyle: space
|
8 | 63 |
|
9 |
| -################################################################################ |
10 |
| -# Individual File Exclusions |
11 |
| -################################################################################ |
| 64 | +Layout/SpaceAroundBlockParameters: |
| 65 | + Enabled: false |
| 66 | + |
| 67 | +Layout/SpaceAroundOperators: |
| 68 | + Enabled: false |
12 | 69 |
|
13 |
| -AllCops: |
| 70 | +Layout/SpaceBeforeComma: |
| 71 | + Enabled: false |
| 72 | + |
| 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: |
14 | 93 | Exclude:
|
15 |
| - # Templates are really ERB which Rubocop does not parse |
16 |
| - - 'lib/generators/rspec/*/templates/**/*' |
| 94 | + # RSpec is tightly coupled to capybara right now, this should be |
| 95 | + # re-evaluted in the future. For now we allow the empty rescue |
| 96 | + - lib/rspec/rails/vendor/capybara.rb |
| 97 | + |
| 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 |
17 | 117 |
|
18 | 118 | Naming/FileName:
|
19 | 119 | Exclude:
|
20 | 120 | # We break convention here so that when bundler requires the gem, which
|
21 | 121 | # uses the gem name, things work without user configuration.
|
22 | 122 | - lib/rspec-rails.rb
|
23 | 123 |
|
24 |
| -Lint/SuppressedException: |
25 |
| - Exclude: |
26 |
| - # RSpec is tightly coupled to capybara right now, this should be |
27 |
| - # re-evaluted in the future. For now we allow the empty rescue |
28 |
| - - lib/rspec/rails/vendor/capybara.rb |
| 124 | +Naming/HeredocDelimiterNaming: |
| 125 | + Enabled: false |
| 126 | + |
| 127 | +Naming/MemoizedInstanceVariableName: |
| 128 | + Enabled: false |
| 129 | + |
| 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 |
29 | 212 |
|
30 | 213 | Style/IfUnlessModifier:
|
31 |
| - Exclude: |
32 |
| - # Allow single line statement as the style matches the remainder of the file |
33 |
| - - lib/rspec/rails/vendor/capybara.rb |
| 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 |
34 | 248 |
|
35 | 249 | Style/PerlBackrefs:
|
36 | 250 | Exclude:
|
37 | 251 | # We probably can refactor the backref out, but for now excluding it since
|
38 | 252 | # we can't use named matches in 1.8.7
|
39 | 253 | - lib/generators/rspec/scaffold/scaffold_generator.rb
|
40 | 254 |
|
41 |
| -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 | +Style/Proc: |
42 | 268 | Enabled: false
|
43 | 269 |
|
44 |
| -Naming/MemoizedInstanceVariableName: |
| 270 | +Style/RegexpLiteral: |
45 | 271 | Enabled: false
|
46 | 272 |
|
47 |
| -Naming/MethodParameterName: |
| 273 | +Style/RedundantReturn: |
48 | 274 | Enabled: false
|
49 | 275 |
|
50 |
| -Metrics/PerceivedComplexity: |
| 276 | +Style/RedundantParentheses: |
51 | 277 | Enabled: false
|
52 | 278 |
|
53 |
| -Metrics/BlockLength: |
| 279 | +Style/RescueStandardError: |
54 | 280 | Enabled: false
|
55 | 281 |
|
56 |
| -Lint/AssignmentInCondition: |
| 282 | +# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention. |
| 283 | +Style/SignalException: |
57 | 284 | Enabled: false
|
58 | 285 |
|
59 |
| -Lint/EmptyExpression: |
| 286 | +# This rule favors constant names from the English standard library which we don't load. |
| 287 | +Style/SpecialGlobalVars: |
60 | 288 | Enabled: false
|
61 | 289 |
|
62 |
| -Layout/HashAlignment: |
| 290 | +Style/StderrPuts: |
63 | 291 | Enabled: false
|
64 | 292 |
|
65 |
| -Naming/RescuedExceptionsVariableName: |
| 293 | +Style/StringLiteralsInInterpolation: |
| 294 | + Enabled: false |
| 295 | + |
| 296 | +Style/StructInheritance: |
| 297 | + Enabled: false |
| 298 | + |
| 299 | +# We don't care about single vs double qoutes. |
| 300 | +Style/StringLiterals: |
| 301 | + Enabled: false |
| 302 | + |
| 303 | +Style/SymbolArray: |
| 304 | + Enabled: false |
| 305 | + |
| 306 | +Style/SymbolProc: |
| 307 | + Enabled: false |
| 308 | + |
| 309 | +Style/TernaryParentheses: |
| 310 | + Enabled: false |
| 311 | + |
| 312 | +Style/TrailingCommaInArrayLiteral: |
| 313 | + Enabled: false |
| 314 | + |
| 315 | +Style/TrailingCommaInHashLiteral: |
| 316 | + Enabled: false |
| 317 | + |
| 318 | +Style/TrailingCommaInArguments: |
| 319 | + Enabled: false |
| 320 | + |
| 321 | +Style/TrivialAccessors: |
| 322 | + AllowDSLWriters: true |
| 323 | + AllowPredicates: true |
| 324 | + ExactNameMatch: true |
| 325 | + |
| 326 | +Style/TrailingUnderscoreVariable: |
| 327 | + Enabled: false |
| 328 | + |
| 329 | +Style/YodaCondition: |
| 330 | + Enabled: false |
| 331 | + |
| 332 | +Style/ZeroLengthPredicate: |
66 | 333 | Enabled: false
|
0 commit comments