cascade-rb 0.1.0

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