shoulda 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +6 -14
  2. data/.gitignore +7 -7
  3. data/.hound.yml +3 -0
  4. data/.hound/ruby.yml +1042 -0
  5. data/.rubocop.yml +13 -0
  6. data/.travis.yml +11 -7
  7. data/Appraisals +13 -10
  8. data/CONTRIBUTING.md +6 -1
  9. data/Gemfile +8 -1
  10. data/README.md +58 -73
  11. data/Rakefile +21 -12
  12. data/gemfiles/4.2.gemfile +17 -0
  13. data/gemfiles/4.2.gemfile.lock +174 -0
  14. data/gemfiles/5.0.gemfile +17 -0
  15. data/gemfiles/5.0.gemfile.lock +179 -0
  16. data/lib/shoulda/version.rb +1 -1
  17. data/shoulda.gemspec +23 -23
  18. data/test/acceptance/rails_integration_test.rb +76 -0
  19. data/test/acceptance_test_helper.rb +17 -0
  20. data/test/report_warnings.rb +7 -0
  21. data/test/support/acceptance/add_shoulda_to_project.rb +78 -0
  22. data/test/support/acceptance/helpers.rb +19 -0
  23. data/test/support/acceptance/helpers/active_model_helpers.rb +11 -0
  24. data/test/support/acceptance/helpers/array_helpers.rb +13 -0
  25. data/test/support/acceptance/helpers/base_helpers.rb +14 -0
  26. data/test/support/acceptance/helpers/command_helpers.rb +54 -0
  27. data/test/support/acceptance/helpers/file_helpers.rb +19 -0
  28. data/test/support/acceptance/helpers/gem_helpers.rb +31 -0
  29. data/test/support/acceptance/helpers/pluralization_helpers.rb +13 -0
  30. data/test/support/acceptance/helpers/step_helpers.rb +69 -0
  31. data/test/support/acceptance/matchers/have_output.rb +31 -0
  32. data/test/support/acceptance/matchers/indicate_number_of_tests_was_run_matcher.rb +54 -0
  33. data/test/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb +75 -0
  34. data/test/support/tests/bundle.rb +94 -0
  35. data/test/support/tests/command_runner.rb +230 -0
  36. data/test/support/tests/current_bundle.rb +61 -0
  37. data/test/support/tests/filesystem.rb +100 -0
  38. data/test/support/tests/version.rb +45 -0
  39. data/test/test_helper.rb +18 -0
  40. data/test/warnings_spy.rb +62 -0
  41. data/test/warnings_spy/filesystem.rb +45 -0
  42. data/test/warnings_spy/partitioner.rb +36 -0
  43. data/test/warnings_spy/reader.rb +53 -0
  44. data/test/warnings_spy/reporter.rb +88 -0
  45. metadata +80 -121
  46. data/features/rails_integration.feature +0 -87
  47. data/features/step_definitions/rails_steps.rb +0 -77
  48. data/features/support/env.rb +0 -14
  49. data/gemfiles/3.0.gemfile +0 -7
  50. data/gemfiles/3.0.gemfile.lock +0 -127
  51. data/gemfiles/3.1.gemfile +0 -9
  52. data/gemfiles/3.1.gemfile.lock +0 -148
  53. data/gemfiles/3.2.gemfile +0 -9
  54. data/gemfiles/3.2.gemfile.lock +0 -146
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YTc4N2U1MTc2NWIzMDdjODE2NmVlZjY0ZTYzZWE2YTY5NDBmN2EyNg==
5
- data.tar.gz: !binary |-
6
- ZjQ3YjJkNDIwYTIzMjJmOWVjNWNjNjJjNGYwN2IwNmNjOWNmZWJmMw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NzIzMGJmMjg2YzUxMDdiYjUzZTNkZWRjMTQ3MDk0MmRhZmQ1NjJlZGJiZmQ4
10
- Y2JkNTg4NzI3ZWVlOGMwZjJiYTBhNzk0YTY3YTFhZmMwNGFkNTEwZmYyZDEx
11
- MWUxMmIxNzlmYjNhY2Q5MDJhYjBjOWRkZGRmMGY1NWM4YWZlYWE=
12
- data.tar.gz: !binary |-
13
- Y2MxNGJiOWY0MGY1NDFjYTRkNzYwOGU3ZjExYTEyMjI5MzVhNDg1YmI2MTFk
14
- NzQ0MjY5NjA1NGRjN2NjOWRlNGI3MWUxZDQyYWZlZjExZWI3ZjdiYTQxMzVj
15
- NjM5ODQwNjc1YTdhYmQ4NWI2NTNhNDZlNzNiYTgxMTMxMWZhNTE=
2
+ SHA256:
3
+ metadata.gz: cd256fdc40162759558e33c2fd011d0c1c78f1fc6a48530c1981c9d5be59749c
4
+ data.tar.gz: 67eed1f001ac7575cf5e71ecd17543a03bdbf12cbd0953616520df25294b1def
5
+ SHA512:
6
+ metadata.gz: c3671625339d0e7f18941504b295e155104e8f67d6c7d7b70afcbf6face4c2fa21eaea02133c6b1da611b000df68f3b89cfee0197cd4ccbb8c81bfdef0542a08
7
+ data.tar.gz: 989e4dc4ed540ed7d2bbc88477f700926e036774ac5ea8310c313778af27ad82e5338ef06056dba2fde9d4fbf08e3cc3e7893522371a6352bb73009399031cf3
data/.gitignore CHANGED
@@ -1,11 +1,11 @@
1
- test/*/log/*.log
2
- doc
3
- coverage
1
+ *.swo
2
+ *.swp
3
+ .bundle
4
4
  .svn/
5
+ Gemfile.lock
6
+ coverage
7
+ doc
5
8
  pkg
6
- *.swp
7
- *.swo
8
9
  tags
10
+ test/*/log/*.log
9
11
  tmp
10
- .bundle
11
- Gemfile.lock
@@ -0,0 +1,3 @@
1
+ ruby:
2
+ enabled: true
3
+ config_file: .rubocop.yml
@@ -0,0 +1,1042 @@
1
+ AllCops:
2
+ Include:
3
+ - "**/*.rake"
4
+ - "**/Gemfile"
5
+ - "**/Rakefile"
6
+ Exclude:
7
+ - "vendor/**/*"
8
+ - "db/**/*"
9
+ DisplayCopNames: false
10
+ StyleGuideCopsOnly: false
11
+ Rails:
12
+ Enabled: true
13
+ Style/AccessModifierIndentation:
14
+ Description: Check indentation of private/protected visibility modifiers.
15
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
16
+ Enabled: true
17
+ EnforcedStyle: indent
18
+ SupportedStyles:
19
+ - outdent
20
+ - indent
21
+ Style/AlignHash:
22
+ Description: Align the elements of a hash literal if they span more than one line.
23
+ Enabled: true
24
+ EnforcedHashRocketStyle: key
25
+ EnforcedColonStyle: key
26
+ EnforcedLastArgumentHashStyle: always_inspect
27
+ SupportedLastArgumentHashStyles:
28
+ - always_inspect
29
+ - always_ignore
30
+ - ignore_implicit
31
+ - ignore_explicit
32
+ Style/AlignParameters:
33
+ Description: Align the parameters of a method call if they span more than one line.
34
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
35
+ Enabled: true
36
+ EnforcedStyle: with_first_parameter
37
+ SupportedStyles:
38
+ - with_first_parameter
39
+ - with_fixed_indentation
40
+ Style/AndOr:
41
+ Description: Use &&/|| instead of and/or.
42
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
43
+ Enabled: true
44
+ EnforcedStyle: always
45
+ SupportedStyles:
46
+ - always
47
+ - conditionals
48
+ Style/BarePercentLiterals:
49
+ Description: Checks if usage of %() or %Q() matches configuration.
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
51
+ Enabled: true
52
+ EnforcedStyle: bare_percent
53
+ SupportedStyles:
54
+ - percent_q
55
+ - bare_percent
56
+ Style/BracesAroundHashParameters:
57
+ Description: Enforce braces style around hash parameters.
58
+ Enabled: true
59
+ EnforcedStyle: no_braces
60
+ SupportedStyles:
61
+ - braces
62
+ - no_braces
63
+ - context_dependent
64
+ Style/CaseIndentation:
65
+ Description: Indentation of when in a case/when/[else/]end.
66
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
67
+ Enabled: true
68
+ EnforcedStyle: case
69
+ SupportedStyles:
70
+ - case
71
+ - end
72
+ IndentOneStep: false
73
+ Style/ClassAndModuleChildren:
74
+ Description: Checks style of children classes and modules.
75
+ Enabled: false
76
+ EnforcedStyle: nested
77
+ SupportedStyles:
78
+ - nested
79
+ - compact
80
+ Style/ClassCheck:
81
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
82
+ Enabled: true
83
+ EnforcedStyle: is_a?
84
+ SupportedStyles:
85
+ - is_a?
86
+ - kind_of?
87
+ Style/CollectionMethods:
88
+ Description: Preferred collection methods.
89
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
90
+ Enabled: true
91
+ PreferredMethods:
92
+ collect: map
93
+ collect!: map!
94
+ inject: reduce
95
+ detect: find
96
+ find_all: select
97
+ find: detect
98
+ Style/CommentAnnotation:
99
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
100
+ REVIEW).
101
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
102
+ Enabled: false
103
+ Keywords:
104
+ - TODO
105
+ - FIXME
106
+ - OPTIMIZE
107
+ - HACK
108
+ - REVIEW
109
+ Style/DotPosition:
110
+ Description: Checks the position of the dot in multi-line method calls.
111
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
112
+ Enabled: true
113
+ EnforcedStyle: trailing
114
+ SupportedStyles:
115
+ - leading
116
+ - trailing
117
+ Style/EmptyLineBetweenDefs:
118
+ Description: Use empty lines between defs.
119
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
120
+ Enabled: true
121
+ AllowAdjacentOneLineDefs: false
122
+ Style/EmptyLinesAroundBlockBody:
123
+ Description: Keeps track of empty lines around block bodies.
124
+ Enabled: true
125
+ EnforcedStyle: no_empty_lines
126
+ SupportedStyles:
127
+ - empty_lines
128
+ - no_empty_lines
129
+ Style/EmptyLinesAroundClassBody:
130
+ Description: Keeps track of empty lines around class bodies.
131
+ Enabled: true
132
+ EnforcedStyle: no_empty_lines
133
+ SupportedStyles:
134
+ - empty_lines
135
+ - no_empty_lines
136
+ Style/EmptyLinesAroundModuleBody:
137
+ Description: Keeps track of empty lines around module bodies.
138
+ Enabled: true
139
+ EnforcedStyle: no_empty_lines
140
+ SupportedStyles:
141
+ - empty_lines
142
+ - no_empty_lines
143
+ Style/Encoding:
144
+ Description: Use UTF-8 as the source file encoding.
145
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
146
+ Enabled: false
147
+ EnforcedStyle: always
148
+ SupportedStyles:
149
+ - when_needed
150
+ - always
151
+ Style/FileName:
152
+ Description: Use snake_case for source file names.
153
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
154
+ Enabled: false
155
+ Exclude: []
156
+ Style/FirstParameterIndentation:
157
+ Description: Checks the indentation of the first parameter in a method call.
158
+ Enabled: true
159
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
160
+ SupportedStyles:
161
+ - consistent
162
+ - special_for_inner_method_call
163
+ - special_for_inner_method_call_in_parentheses
164
+ Style/For:
165
+ Description: Checks use of for or each in multiline loops.
166
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
167
+ Enabled: true
168
+ EnforcedStyle: each
169
+ SupportedStyles:
170
+ - for
171
+ - each
172
+ Style/FormatString:
173
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
174
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
175
+ Enabled: false
176
+ EnforcedStyle: format
177
+ SupportedStyles:
178
+ - format
179
+ - sprintf
180
+ - percent
181
+ Style/GlobalVars:
182
+ Description: Do not introduce global variables.
183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
184
+ Enabled: false
185
+ AllowedVariables: []
186
+ Style/GuardClause:
187
+ Description: Check for conditionals that can be replaced with guard clauses
188
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
189
+ Enabled: false
190
+ MinBodyLength: 1
191
+ Style/HashSyntax:
192
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
193
+ 1, :b => 2 }.'
194
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
195
+ Enabled: true
196
+ EnforcedStyle: ruby19
197
+ SupportedStyles:
198
+ - ruby19
199
+ - hash_rockets
200
+ Style/IfUnlessModifier:
201
+ Description: Favor modifier if/unless usage when you have a single-line body.
202
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
203
+ Enabled: false
204
+ MaxLineLength: 80
205
+ Style/IndentationWidth:
206
+ Description: Use 2 spaces for indentation.
207
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
208
+ Enabled: true
209
+ Width: 2
210
+ Style/IndentHash:
211
+ Description: Checks the indentation of the first key in a hash literal.
212
+ Enabled: true
213
+ EnforcedStyle: special_inside_parentheses
214
+ SupportedStyles:
215
+ - special_inside_parentheses
216
+ - consistent
217
+ Style/LambdaCall:
218
+ Description: Use lambda.call(...) instead of lambda.(...).
219
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
220
+ Enabled: false
221
+ EnforcedStyle: call
222
+ SupportedStyles:
223
+ - call
224
+ - braces
225
+ Style/Next:
226
+ Description: Use `next` to skip iteration instead of a condition at the end.
227
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
228
+ Enabled: false
229
+ EnforcedStyle: skip_modifier_ifs
230
+ MinBodyLength: 3
231
+ SupportedStyles:
232
+ - skip_modifier_ifs
233
+ - always
234
+ Style/NonNilCheck:
235
+ Description: Checks for redundant nil checks.
236
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
237
+ Enabled: true
238
+ IncludeSemanticChanges: false
239
+ Style/MethodDefParentheses:
240
+ Description: Checks if the method definitions have or don't have parentheses.
241
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
242
+ Enabled: true
243
+ EnforcedStyle: require_parentheses
244
+ SupportedStyles:
245
+ - require_parentheses
246
+ - require_no_parentheses
247
+ Style/MethodName:
248
+ Description: Use the configured style when naming methods.
249
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
250
+ Enabled: true
251
+ EnforcedStyle: snake_case
252
+ SupportedStyles:
253
+ - snake_case
254
+ - camelCase
255
+ Style/MultilineMethodCallIndentation:
256
+ Description: Checks indentation of method calls with the dot operator
257
+ that span more than one line.
258
+ Enabled: true
259
+ EnforcedStyle: indented
260
+ SupportedStyles:
261
+ - aligned
262
+ - indented
263
+ Style/MultilineOperationIndentation:
264
+ Description: Checks indentation of binary operations that span more than one line.
265
+ Enabled: true
266
+ EnforcedStyle: indented
267
+ SupportedStyles:
268
+ - aligned
269
+ - indented
270
+ Style/NumericLiterals:
271
+ Description: Add underscores to large numeric literals to improve their readability.
272
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
273
+ Enabled: false
274
+ MinDigits: 5
275
+ Style/NumericPredicate:
276
+ Enabled: false
277
+ Style/ParenthesesAroundCondition:
278
+ Description: Don't use parentheses around the condition of an if/unless/while.
279
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
280
+ Enabled: true
281
+ AllowSafeAssignment: true
282
+ Style/PercentLiteralDelimiters:
283
+ Description: Use `%`-literal delimiters consistently
284
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
285
+ Enabled: false
286
+ PreferredDelimiters:
287
+ "%": "()"
288
+ "%i": "()"
289
+ "%q": "()"
290
+ "%Q": "()"
291
+ "%r": "{}"
292
+ "%s": "()"
293
+ "%w": "()"
294
+ "%W": "()"
295
+ "%x": "()"
296
+ Style/PercentQLiterals:
297
+ Description: Checks if uses of %Q/%q match the configured preference.
298
+ Enabled: true
299
+ EnforcedStyle: lower_case_q
300
+ SupportedStyles:
301
+ - lower_case_q
302
+ - upper_case_q
303
+ Style/PredicateName:
304
+ Description: Check the names of predicate methods.
305
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
306
+ Enabled: true
307
+ NamePrefix:
308
+ - is_
309
+ - has_
310
+ - have_
311
+ NamePrefixBlacklist:
312
+ - is_
313
+ Style/RaiseArgs:
314
+ Description: Checks the arguments passed to raise/fail.
315
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
316
+ Enabled: false
317
+ EnforcedStyle: exploded
318
+ SupportedStyles:
319
+ - compact
320
+ - exploded
321
+ Style/RedundantReturn:
322
+ Description: Don't use return where it's not required.
323
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
324
+ Enabled: true
325
+ AllowMultipleReturnValues: false
326
+ Style/RegexpLiteral:
327
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
328
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
329
+ '/' character.
330
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
331
+ Enabled: false
332
+ Style/Semicolon:
333
+ Description: Don't use semicolons to terminate expressions.
334
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
335
+ Enabled: true
336
+ AllowAsExpressionSeparator: false
337
+ Style/SignalException:
338
+ Description: Checks for proper usage of fail and raise.
339
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
340
+ Enabled: false
341
+ EnforcedStyle: semantic
342
+ SupportedStyles:
343
+ - only_raise
344
+ - only_fail
345
+ - semantic
346
+ Style/SingleLineBlockParams:
347
+ Description: Enforces the names of some block params.
348
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
349
+ Enabled: false
350
+ Methods:
351
+ - reduce:
352
+ - a
353
+ - e
354
+ - inject:
355
+ - a
356
+ - e
357
+ Style/SingleLineMethods:
358
+ Description: Avoid single-line methods.
359
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
360
+ Enabled: false
361
+ AllowIfMethodIsEmpty: true
362
+ Style/StringLiterals:
363
+ Description: Checks if uses of quotes match the configured preference.
364
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
365
+ Enabled: true
366
+ EnforcedStyle: double_quotes
367
+ SupportedStyles:
368
+ - single_quotes
369
+ - double_quotes
370
+ Style/StringLiteralsInInterpolation:
371
+ Description: Checks if uses of quotes inside expressions in interpolated strings
372
+ match the configured preference.
373
+ Enabled: true
374
+ EnforcedStyle: single_quotes
375
+ SupportedStyles:
376
+ - single_quotes
377
+ - double_quotes
378
+ Style/SpaceAroundBlockParameters:
379
+ Description: Checks the spacing inside and after block parameters pipes.
380
+ Enabled: true
381
+ EnforcedStyleInsidePipes: no_space
382
+ Style/SpaceAroundEqualsInParameterDefault:
383
+ Description: Checks that the equals signs in parameter default assignments have
384
+ or don't have surrounding space depending on configuration.
385
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
386
+ Enabled: true
387
+ EnforcedStyle: space
388
+ SupportedStyles:
389
+ - space
390
+ - no_space
391
+ Style/SpaceBeforeBlockBraces:
392
+ Description: Checks that the left block brace has or doesn't have space before it.
393
+ Enabled: true
394
+ EnforcedStyle: space
395
+ SupportedStyles:
396
+ - space
397
+ - no_space
398
+ Style/SpaceInsideBlockBraces:
399
+ Description: Checks that block braces have or don't have surrounding space. For
400
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
401
+ space.
402
+ Enabled: true
403
+ EnforcedStyle: space
404
+ SupportedStyles:
405
+ - space
406
+ - no_space
407
+ EnforcedStyleForEmptyBraces: no_space
408
+ SpaceBeforeBlockParameters: true
409
+ Style/SpaceInsideHashLiteralBraces:
410
+ Description: Use spaces inside hash literal braces - or don't.
411
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
412
+ Enabled: true
413
+ EnforcedStyle: space
414
+ EnforcedStyleForEmptyBraces: no_space
415
+ SupportedStyles:
416
+ - space
417
+ - no_space
418
+ Style/SymbolProc:
419
+ Description: Use symbols as procs instead of blocks when possible.
420
+ Enabled: true
421
+ IgnoredMethods:
422
+ - respond_to
423
+ Style/TrailingBlankLines:
424
+ Description: Checks trailing blank lines and final newline.
425
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
426
+ Enabled: true
427
+ EnforcedStyle: final_newline
428
+ SupportedStyles:
429
+ - final_newline
430
+ - final_blank_line
431
+ Style/TrailingCommaInLiteral:
432
+ Description: Checks for trailing comma in parameter lists and literals.
433
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
434
+ Enabled: true
435
+ EnforcedStyleForMultiline: comma
436
+ Style/TrailingCommaInArguments:
437
+ Description: Checks for trailing comma in parameter lists and literals.
438
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
439
+ Enabled: true
440
+ EnforcedStyleForMultiline: comma
441
+ Style/TrivialAccessors:
442
+ Description: Prefer attr_* methods to trivial readers/writers.
443
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
444
+ Enabled: false
445
+ ExactNameMatch: false
446
+ AllowPredicates: false
447
+ AllowDSLWriters: false
448
+ Whitelist:
449
+ - to_ary
450
+ - to_a
451
+ - to_c
452
+ - to_enum
453
+ - to_h
454
+ - to_hash
455
+ - to_i
456
+ - to_int
457
+ - to_io
458
+ - to_open
459
+ - to_path
460
+ - to_proc
461
+ - to_r
462
+ - to_regexp
463
+ - to_str
464
+ - to_s
465
+ - to_sym
466
+ Style/VariableName:
467
+ Description: Use the configured style when naming variables.
468
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
469
+ Enabled: true
470
+ EnforcedStyle: snake_case
471
+ SupportedStyles:
472
+ - snake_case
473
+ - camelCase
474
+ Style/WhileUntilModifier:
475
+ Description: Favor modifier while/until usage when you have a single-line body.
476
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
477
+ Enabled: false
478
+ MaxLineLength: 80
479
+ Style/WordArray:
480
+ Description: Use %w or %W for arrays of words.
481
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
482
+ Enabled: false
483
+ MinSize: 0
484
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
485
+ Metrics/AbcSize:
486
+ Description: A calculated magnitude based on number of assignments, branches, and
487
+ conditions.
488
+ Enabled: true
489
+ Max: 15
490
+ Metrics/BlockNesting:
491
+ Description: Avoid excessive block nesting
492
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
493
+ Enabled: true
494
+ Max: 3
495
+ Metrics/ClassLength:
496
+ Description: Avoid classes longer than 100 lines of code.
497
+ Enabled: false
498
+ CountComments: false
499
+ Max: 100
500
+ Metrics/CyclomaticComplexity:
501
+ Description: A complexity metric that is strongly correlated to the number of test
502
+ cases needed to validate a method.
503
+ Enabled: true
504
+ Max: 6
505
+ Metrics/LineLength:
506
+ Description: Limit lines to 80 characters.
507
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
508
+ Enabled: true
509
+ Max: 80
510
+ AllowURI: true
511
+ URISchemes:
512
+ - http
513
+ - https
514
+ Metrics/MethodLength:
515
+ Description: Avoid methods longer than 10 lines of code.
516
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
517
+ Enabled: true
518
+ CountComments: true
519
+ Max: 10
520
+ Exclude:
521
+ - "spec/**/*"
522
+ Metrics/ParameterLists:
523
+ Description: Avoid long parameter lists.
524
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
525
+ Enabled: true
526
+ Max: 5
527
+ CountKeywordArgs: true
528
+ Metrics/PerceivedComplexity:
529
+ Description: A complexity metric geared towards measuring complexity for a human
530
+ reader.
531
+ Enabled: true
532
+ Max: 7
533
+ Lint/AssignmentInCondition:
534
+ Description: Don't use assignment in conditions.
535
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
536
+ Enabled: false
537
+ AllowSafeAssignment: true
538
+ Lint/EndAlignment:
539
+ Description: Align ends correctly.
540
+ Enabled: true
541
+ EnforcedStyleAlignWith: keyword
542
+ Lint/DefEndAlignment:
543
+ Description: Align ends corresponding to defs correctly.
544
+ Enabled: true
545
+ EnforcedStyleAlignWith: start_of_line
546
+ Rails/ActionFilter:
547
+ Description: Enforces consistent use of action filter methods.
548
+ Enabled: true
549
+ EnforcedStyle: action
550
+ SupportedStyles:
551
+ - action
552
+ - filter
553
+ Include:
554
+ - app/controllers/**/*.rb
555
+ Rails/HasAndBelongsToMany:
556
+ Description: Prefer has_many :through to has_and_belongs_to_many.
557
+ Enabled: true
558
+ Include:
559
+ - app/models/**/*.rb
560
+ Rails/HttpPositionalArguments:
561
+ Enabled: false
562
+ Rails/Output:
563
+ Description: Checks for calls to puts, print, etc.
564
+ Enabled: true
565
+ Include:
566
+ - app/**/*.rb
567
+ - config/**/*.rb
568
+ - db/**/*.rb
569
+ - lib/**/*.rb
570
+ Rails/ReadWriteAttribute:
571
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
572
+ Enabled: true
573
+ Include:
574
+ - app/models/**/*.rb
575
+ Rails/ScopeArgs:
576
+ Description: Checks the arguments of ActiveRecord scopes.
577
+ Enabled: true
578
+ Include:
579
+ - app/models/**/*.rb
580
+ Rails/Validation:
581
+ Description: Use validates :attribute, hash of validations.
582
+ Enabled: true
583
+ Include:
584
+ - app/models/**/*.rb
585
+ Style/InlineComment:
586
+ Description: Avoid inline comments.
587
+ Enabled: false
588
+ Style/MethodCalledOnDoEndBlock:
589
+ Description: Avoid chaining a method call on a do...end block.
590
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
591
+ Enabled: false
592
+ Style/SymbolArray:
593
+ Description: Use %i or %I for arrays of symbols.
594
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
595
+ Enabled: false
596
+ Style/ExtraSpacing:
597
+ Description: Do not use unnecessary spacing.
598
+ Enabled: true
599
+ Style/AccessorMethodName:
600
+ Description: Check the naming of accessor methods for get_/set_.
601
+ Enabled: false
602
+ Style/Alias:
603
+ Description: Use alias_method instead of alias.
604
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
605
+ Enabled: false
606
+ Style/AlignArray:
607
+ Description: Align the elements of an array literal if they span more than one line.
608
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
609
+ Enabled: true
610
+ Style/ArrayJoin:
611
+ Description: Use Array#join instead of Array#*.
612
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
613
+ Enabled: false
614
+ Style/AsciiComments:
615
+ Description: Use only ascii symbols in comments.
616
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
617
+ Enabled: false
618
+ Style/AsciiIdentifiers:
619
+ Description: Use only ascii symbols in identifiers.
620
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
621
+ Enabled: false
622
+ Style/Attr:
623
+ Description: Checks for uses of Module#attr.
624
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
625
+ Enabled: false
626
+ Style/BeginBlock:
627
+ Description: Avoid the use of BEGIN blocks.
628
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
629
+ Enabled: true
630
+ Style/BlockComments:
631
+ Description: Do not use block comments.
632
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
633
+ Enabled: true
634
+ Style/BlockEndNewline:
635
+ Description: Put end statement of multiline block on its own line.
636
+ Enabled: true
637
+ Style/BlockDelimiters:
638
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
639
+ ugly). Prefer {...} over do...end for single-line blocks.
640
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
641
+ Enabled: true
642
+ Style/CaseEquality:
643
+ Description: Avoid explicit use of the case equality operator(===).
644
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
645
+ Enabled: false
646
+ Style/CharacterLiteral:
647
+ Description: Checks for uses of character literals.
648
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
649
+ Enabled: false
650
+ Style/ClassAndModuleCamelCase:
651
+ Description: Use CamelCase for classes and modules.
652
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
653
+ Enabled: true
654
+ Style/ClassMethods:
655
+ Description: Use self when defining module/class methods.
656
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
657
+ Enabled: true
658
+ Style/ClassVars:
659
+ Description: Avoid the use of class variables.
660
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
661
+ Enabled: false
662
+ Style/ColonMethodCall:
663
+ Description: 'Do not use :: for method call.'
664
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
665
+ Enabled: false
666
+ Style/CommentIndentation:
667
+ Description: Indentation of comments.
668
+ Enabled: true
669
+ Style/ConstantName:
670
+ Description: Constants should use SCREAMING_SNAKE_CASE.
671
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
672
+ Enabled: true
673
+ Style/DefWithParentheses:
674
+ Description: Use def with parentheses when there are arguments.
675
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
676
+ Enabled: true
677
+ Style/Documentation:
678
+ Description: Document classes and non-namespace modules.
679
+ Enabled: false
680
+ Style/DoubleNegation:
681
+ Description: Checks for uses of double negation (!!).
682
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
683
+ Enabled: false
684
+ Style/EachWithObject:
685
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
686
+ Enabled: false
687
+ Style/ElseAlignment:
688
+ Description: Align elses and elsifs correctly.
689
+ Enabled: true
690
+ Style/EmptyElse:
691
+ Description: Avoid empty else-clauses.
692
+ Enabled: true
693
+ Style/EmptyLines:
694
+ Description: Don't use several empty lines in a row.
695
+ Enabled: true
696
+ Style/EmptyLinesAroundAccessModifier:
697
+ Description: Keep blank lines around access modifiers.
698
+ Enabled: true
699
+ Style/EmptyLinesAroundMethodBody:
700
+ Description: Keeps track of empty lines around method bodies.
701
+ Enabled: true
702
+ Style/EmptyLiteral:
703
+ Description: Prefer literals to Array.new/Hash.new/String.new.
704
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
705
+ Enabled: false
706
+ Style/EndBlock:
707
+ Description: Avoid the use of END blocks.
708
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
709
+ Enabled: true
710
+ Style/EndOfLine:
711
+ Description: Use Unix-style line endings.
712
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
713
+ Enabled: true
714
+ Style/EvenOdd:
715
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
716
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
717
+ Enabled: false
718
+ Style/FlipFlop:
719
+ Description: Checks for flip flops
720
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
721
+ Enabled: false
722
+ Style/IfWithSemicolon:
723
+ Description: Do not use if x; .... Use the ternary operator instead.
724
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
725
+ Enabled: false
726
+ Style/IndentationConsistency:
727
+ Description: Keep indentation straight.
728
+ Enabled: true
729
+ Style/IndentArray:
730
+ Description: Checks the indentation of the first element in an array literal.
731
+ Enabled: true
732
+ Style/InfiniteLoop:
733
+ Description: Use Kernel#loop for infinite loops.
734
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
735
+ Enabled: true
736
+ Style/Lambda:
737
+ Description: Use the new lambda literal syntax for single-line blocks.
738
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
739
+ Enabled: false
740
+ Style/LeadingCommentSpace:
741
+ Description: Comments should start with a space.
742
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
743
+ Enabled: true
744
+ Style/LineEndConcatenation:
745
+ Description: Use \ instead of + or << to concatenate two string literals at line
746
+ end.
747
+ Enabled: false
748
+ Style/MethodCallWithoutArgsParentheses:
749
+ Description: Do not use parentheses for method calls with no arguments.
750
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
751
+ Enabled: true
752
+ Style/ModuleFunction:
753
+ Description: Checks for usage of `extend self` in modules.
754
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
755
+ Enabled: false
756
+ Style/MultilineBlockLayout:
757
+ Description: Ensures newlines after multiline block do statements.
758
+ Enabled: true
759
+ Style/MultilineIfThen:
760
+ Description: Do not use then for multi-line if/unless.
761
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
762
+ Enabled: true
763
+ Style/MultilineTernaryOperator:
764
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
765
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
766
+ Enabled: true
767
+ Style/NegatedIf:
768
+ Description: Favor unless over if for negative conditions (or control flow or).
769
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
770
+ Enabled: false
771
+ Style/NegatedWhile:
772
+ Description: Favor until over while for negative conditions.
773
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
774
+ Enabled: false
775
+ Style/NestedTernaryOperator:
776
+ Description: Use one expression per branch in a ternary operator.
777
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
778
+ Enabled: true
779
+ Style/NilComparison:
780
+ Description: Prefer x.nil? to x == nil.
781
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
782
+ Enabled: false
783
+ Style/Not:
784
+ Description: Use ! instead of not.
785
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
786
+ Enabled: false
787
+ Style/OneLineConditional:
788
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
789
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
790
+ Enabled: false
791
+ Style/OpMethod:
792
+ Description: When defining binary operators, name the argument other.
793
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
794
+ Enabled: false
795
+ Style/PerlBackrefs:
796
+ Description: Avoid Perl-style regex back references.
797
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
798
+ Enabled: false
799
+ Style/Proc:
800
+ Description: Use proc instead of Proc.new.
801
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
802
+ Enabled: false
803
+ Style/RedundantBegin:
804
+ Description: Don't use begin blocks when they are not needed.
805
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
806
+ Enabled: true
807
+ Style/RedundantException:
808
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
809
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
810
+ Enabled: true
811
+ Style/RedundantSelf:
812
+ Description: Don't use self where it's not needed.
813
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
814
+ Enabled: true
815
+ Style/RescueModifier:
816
+ Description: Avoid using rescue in its modifier form.
817
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
818
+ Enabled: true
819
+ Style/SelfAssignment:
820
+ Description: Checks for places where self-assignment shorthand should have been
821
+ used.
822
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
823
+ Enabled: false
824
+ Style/SpaceBeforeFirstArg:
825
+ Description: Checks that exactly one space is used between a method name and the
826
+ first argument for method calls without parentheses.
827
+ Enabled: true
828
+ Style/SpaceAfterColon:
829
+ Description: Use spaces after colons.
830
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
831
+ Enabled: true
832
+ Style/SpaceAfterComma:
833
+ Description: Use spaces after commas.
834
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
835
+ Enabled: true
836
+ Style/SpaceAroundKeyword:
837
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
838
+ Enabled: true
839
+ Style/SpaceAfterMethodName:
840
+ Description: Do not put a space between a method name and the opening parenthesis
841
+ in a method definition.
842
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
843
+ Enabled: true
844
+ Style/SpaceAfterNot:
845
+ Description: Tracks redundant space after the ! operator.
846
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
847
+ Enabled: true
848
+ Style/SpaceAfterSemicolon:
849
+ Description: Use spaces after semicolons.
850
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
851
+ Enabled: true
852
+ Style/SpaceBeforeComma:
853
+ Description: No spaces before commas.
854
+ Enabled: true
855
+ Style/SpaceBeforeComment:
856
+ Description: Checks for missing space between code and a comment on the same line.
857
+ Enabled: true
858
+ Style/SpaceBeforeSemicolon:
859
+ Description: No spaces before semicolons.
860
+ Enabled: true
861
+ Style/SpaceAroundOperators:
862
+ Description: Use spaces around operators.
863
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
864
+ Enabled: true
865
+ Style/SpaceAroundKeyword:
866
+ Description: Put a space before the modifier keyword.
867
+ Enabled: true
868
+ Style/SpaceInsideBrackets:
869
+ Description: No spaces after [ or before ].
870
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
871
+ Enabled: true
872
+ Style/SpaceInsideParens:
873
+ Description: No spaces after ( or before ).
874
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
875
+ Enabled: true
876
+ Style/SpaceInsideRangeLiteral:
877
+ Description: No spaces inside range literals.
878
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
879
+ Enabled: true
880
+ Style/SpecialGlobalVars:
881
+ Description: Avoid Perl-style global variables.
882
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
883
+ Enabled: false
884
+ Style/StructInheritance:
885
+ Description: Checks for inheritance from Struct.new.
886
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
887
+ Enabled: true
888
+ Style/Tab:
889
+ Description: No hard tabs.
890
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
891
+ Enabled: true
892
+ Style/TrailingWhitespace:
893
+ Description: Avoid trailing whitespace.
894
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
895
+ Enabled: true
896
+ Style/UnlessElse:
897
+ Description: Do not use unless with else. Rewrite these with the positive case first.
898
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
899
+ Enabled: true
900
+ Style/UnneededCapitalW:
901
+ Description: Checks for %W when interpolation is not needed.
902
+ Enabled: true
903
+ Style/UnneededPercentQ:
904
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
905
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
906
+ Enabled: true
907
+ Style/CommandLiteral:
908
+ Description: Checks for %x when `` would do.
909
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
910
+ Enabled: true
911
+ Style/VariableInterpolation:
912
+ Description: Don't interpolate global, instance and class variables directly in
913
+ strings.
914
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
915
+ Enabled: false
916
+ Style/WhenThen:
917
+ Description: Use when x then ... for one-line cases.
918
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
919
+ Enabled: false
920
+ Style/WhileUntilDo:
921
+ Description: Checks for redundant do after while or until.
922
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
923
+ Enabled: true
924
+ Lint/AmbiguousOperator:
925
+ Description: Checks for ambiguous operators in the first argument of a method invocation
926
+ without parentheses.
927
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
928
+ Enabled: false
929
+ Lint/AmbiguousRegexpLiteral:
930
+ Description: Checks for ambiguous regexp literals in the first argument of a method
931
+ invocation without parenthesis.
932
+ Enabled: false
933
+ Lint/BlockAlignment:
934
+ Description: Align block ends correctly.
935
+ Enabled: true
936
+ Lint/ConditionPosition:
937
+ Description: Checks for condition placed in a confusing position relative to the
938
+ keyword.
939
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
940
+ Enabled: false
941
+ Lint/Debugger:
942
+ Description: Check for debugger calls.
943
+ Enabled: true
944
+ Lint/DeprecatedClassMethods:
945
+ Description: Check for deprecated class method calls.
946
+ Enabled: false
947
+ Lint/DuplicateMethods:
948
+ Description: Check for duplicate methods calls.
949
+ Enabled: true
950
+ Lint/ElseLayout:
951
+ Description: Check for odd code arrangement in an else block.
952
+ Enabled: false
953
+ Lint/EmptyEnsure:
954
+ Description: Checks for empty ensure block.
955
+ Enabled: true
956
+ Lint/EmptyInterpolation:
957
+ Description: Checks for empty string interpolation.
958
+ Enabled: true
959
+ Lint/EndInMethod:
960
+ Description: END blocks should not be placed inside method definitions.
961
+ Enabled: true
962
+ Lint/EnsureReturn:
963
+ Description: Do not use return in an ensure block.
964
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
965
+ Enabled: true
966
+ Lint/HandleExceptions:
967
+ Description: Don't suppress exception.
968
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
969
+ Enabled: false
970
+ Lint/InvalidCharacterLiteral:
971
+ Description: Checks for invalid character literals with a non-escaped whitespace
972
+ character.
973
+ Enabled: false
974
+ Lint/LiteralInCondition:
975
+ Description: Checks of literals used in conditions.
976
+ Enabled: false
977
+ Lint/LiteralInInterpolation:
978
+ Description: Checks for literals used in interpolation.
979
+ Enabled: false
980
+ Lint/Loop:
981
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
982
+ for post-loop tests.
983
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
984
+ Enabled: false
985
+ Lint/ParenthesesAsGroupedExpression:
986
+ Description: Checks for method calls with a space before the opening parenthesis.
987
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
988
+ Enabled: false
989
+ Lint/RequireParentheses:
990
+ Description: Use parentheses in the method call to avoid confusion about precedence.
991
+ Enabled: false
992
+ Lint/RescueException:
993
+ Description: Avoid rescuing the Exception class.
994
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
995
+ Enabled: true
996
+ Lint/ShadowingOuterLocalVariable:
997
+ Description: Do not use the same name as outer local variable for block arguments
998
+ or block local variables.
999
+ Enabled: true
1000
+ Lint/StringConversionInInterpolation:
1001
+ Description: Checks for Object#to_s usage in string interpolation.
1002
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1003
+ Enabled: true
1004
+ Lint/UnderscorePrefixedVariableName:
1005
+ Description: Do not use prefix `_` for a variable that is used.
1006
+ Enabled: false
1007
+ Lint/UnusedBlockArgument:
1008
+ Description: Checks for unused block arguments.
1009
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1010
+ Enabled: true
1011
+ Lint/UnusedMethodArgument:
1012
+ Description: Checks for unused method arguments.
1013
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1014
+ Enabled: true
1015
+ Lint/UnreachableCode:
1016
+ Description: Unreachable code.
1017
+ Enabled: true
1018
+ Lint/UselessAccessModifier:
1019
+ Description: Checks for useless access modifiers.
1020
+ Enabled: true
1021
+ Lint/UselessAssignment:
1022
+ Description: Checks for useless assignment to a local variable.
1023
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1024
+ Enabled: true
1025
+ Lint/UselessComparison:
1026
+ Description: Checks for comparison of something with itself.
1027
+ Enabled: true
1028
+ Lint/UselessElseWithoutRescue:
1029
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1030
+ Enabled: true
1031
+ Lint/UselessSetterCall:
1032
+ Description: Checks for useless setter call to a local variable.
1033
+ Enabled: true
1034
+ Lint/Void:
1035
+ Description: Possible use of operator/literal/variable in void context.
1036
+ Enabled: false
1037
+ Rails/Delegate:
1038
+ Description: Prefer delegate method for delegations.
1039
+ Enabled: false
1040
+ Security/Eval:
1041
+ Description: The use of eval represents a serious security risk.
1042
+ Enabled: true