copyrighter 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5dfc9761a321e76ee5f0655393978160d0685c04
4
+ data.tar.gz: 55e8de46ef27f6a7abc6d0cbc0708042787a077b
5
+ SHA512:
6
+ metadata.gz: 64b2f3a89169b4eef88ceb83730ca1cf628eb929825518810cfebb2d9705cacfc3c00670428bf24dfee4f5c31f2e8cc8353f3c3c77c54fcc7b2813f7023ac670
7
+ data.tar.gz: 81c96b029db8e3f223d47380e6fa65a0bf6dc502c57e4fa7918e3ac1c2b83ef5ab50200a492a784254f3c105e32c3e0c7cf94f427f79ccfdfec8a3068110f3f1
data/.gitignore CHANGED
@@ -1,18 +1,12 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- .DS_Store
7
- Gemfile.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- doc/
12
- lib/bundler/man
13
- pkg
14
- rdoc
15
- spec/reports
16
- test/tmp
17
- test/version_tmp
18
- tmp
1
+ /.bundle/
2
+ /.env
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ /vendor/bundle/
12
+ /*.gem
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .ruby-style.yml
@@ -0,0 +1 @@
1
+ inherit_from: .ruby-style.yml
@@ -0,0 +1,1260 @@
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
+ DisplayStyleGuide: false
24
+ StyleGuideCopsOnly: false
25
+ DisabledByDefault: false
26
+ UseCache: false
27
+ MaxFilesInCache: 20000
28
+ CacheRootDirectory: "/tmp"
29
+ Style/AccessModifierIndentation:
30
+ Description: Check indentation of private/protected visibility modifiers.
31
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
32
+ Enabled: true
33
+ EnforcedStyle: indent
34
+ SupportedStyles:
35
+ - outdent
36
+ - indent
37
+ Style/AlignHash:
38
+ Description: Align the elements of a hash literal if they span more than one line.
39
+ Enabled: true
40
+ EnforcedHashRocketStyle: key
41
+ EnforcedColonStyle: key
42
+ EnforcedLastArgumentHashStyle: always_inspect
43
+ SupportedLastArgumentHashStyles:
44
+ - always_inspect
45
+ - always_ignore
46
+ - ignore_implicit
47
+ - ignore_explicit
48
+ Style/AlignParameters:
49
+ Description: Align the parameters of a method call if they span more than one line.
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
51
+ Enabled: true
52
+ EnforcedStyle: with_first_parameter
53
+ SupportedStyles:
54
+ - with_first_parameter
55
+ - with_fixed_indentation
56
+ Style/AndOr:
57
+ Description: Use &&/|| instead of and/or.
58
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
59
+ Enabled: true
60
+ EnforcedStyle: always
61
+ SupportedStyles:
62
+ - always
63
+ - conditionals
64
+ Style/AutoResourceCleanup:
65
+ Description: Suggests the usage of an auto resource cleanup version of a method
66
+ (if available).
67
+ Enabled: false
68
+ Style/BarePercentLiterals:
69
+ Description: Checks if usage of %() or %Q() matches configuration.
70
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
71
+ Enabled: true
72
+ EnforcedStyle: bare_percent
73
+ SupportedStyles:
74
+ - percent_q
75
+ - bare_percent
76
+ Style/BracesAroundHashParameters:
77
+ Description: Enforce braces style around hash parameters.
78
+ Enabled: true
79
+ EnforcedStyle: no_braces
80
+ SupportedStyles:
81
+ - braces
82
+ - no_braces
83
+ - context_dependent
84
+ Style/CaseIndentation:
85
+ Description: Indentation of when in a case/when/[else/]end.
86
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
87
+ Enabled: true
88
+ IndentWhenRelativeTo: case
89
+ SupportedStyles:
90
+ - case
91
+ - end
92
+ IndentOneStep: false
93
+ Style/ClassAndModuleChildren:
94
+ Description: Checks style of children classes and modules.
95
+ Enabled: false
96
+ EnforcedStyle: nested
97
+ SupportedStyles:
98
+ - nested
99
+ - compact
100
+ Style/ClassCheck:
101
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
102
+ Enabled: true
103
+ EnforcedStyle: is_a?
104
+ SupportedStyles:
105
+ - is_a?
106
+ - kind_of?
107
+ Style/CollectionMethods:
108
+ Description: Preferred collection methods.
109
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
110
+ Enabled: true
111
+ PreferredMethods:
112
+ collect: map
113
+ collect!: map!
114
+ find: detect
115
+ find_all: select
116
+ reduce: inject
117
+ Style/CommentAnnotation:
118
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
119
+ REVIEW).
120
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
121
+ Enabled: false
122
+ Keywords:
123
+ - TODO
124
+ - FIXME
125
+ - OPTIMIZE
126
+ - HACK
127
+ - REVIEW
128
+ Style/Copyright:
129
+ Description: Include a copyright notice in each file before any code.
130
+ Enabled: false
131
+ Style/DotPosition:
132
+ Description: Checks the position of the dot in multi-line method calls.
133
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
134
+ Enabled: true
135
+ EnforcedStyle: trailing
136
+ SupportedStyles:
137
+ - leading
138
+ - trailing
139
+ Style/EmptyLineBetweenDefs:
140
+ Description: Use empty lines between defs.
141
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
142
+ Enabled: true
143
+ AllowAdjacentOneLineDefs: false
144
+ Style/EmptyLinesAroundBlockBody:
145
+ Description: Keeps track of empty lines around block bodies.
146
+ Enabled: true
147
+ EnforcedStyle: no_empty_lines
148
+ SupportedStyles:
149
+ - empty_lines
150
+ - no_empty_lines
151
+ Style/EmptyLinesAroundClassBody:
152
+ Description: Keeps track of empty lines around class bodies.
153
+ Enabled: true
154
+ EnforcedStyle: no_empty_lines
155
+ SupportedStyles:
156
+ - empty_lines
157
+ - no_empty_lines
158
+ Style/EmptyLinesAroundModuleBody:
159
+ Description: Keeps track of empty lines around module bodies.
160
+ Enabled: true
161
+ EnforcedStyle: no_empty_lines
162
+ SupportedStyles:
163
+ - empty_lines
164
+ - no_empty_lines
165
+ Style/Encoding:
166
+ Description: Use UTF-8 as the source file encoding.
167
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
168
+ Enabled: false
169
+ EnforcedStyle: always
170
+ SupportedStyles:
171
+ - when_needed
172
+ - always
173
+ Style/FileName:
174
+ Description: Use snake_case for source file names.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
176
+ Enabled: false
177
+ Exclude: []
178
+ Style/FirstParameterIndentation:
179
+ Description: Checks the indentation of the first parameter in a method call.
180
+ Enabled: true
181
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
182
+ SupportedStyles:
183
+ - consistent
184
+ - special_for_inner_method_call
185
+ - special_for_inner_method_call_in_parentheses
186
+ Style/For:
187
+ Description: Checks use of for or each in multiline loops.
188
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
189
+ Enabled: true
190
+ EnforcedStyle: each
191
+ SupportedStyles:
192
+ - for
193
+ - each
194
+ Style/FormatString:
195
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
196
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
197
+ Enabled: false
198
+ EnforcedStyle: format
199
+ SupportedStyles:
200
+ - format
201
+ - sprintf
202
+ - percent
203
+ Style/GlobalVars:
204
+ Description: Do not introduce global variables.
205
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
206
+ Enabled: false
207
+ AllowedVariables: []
208
+ Style/GuardClause:
209
+ Description: Check for conditionals that can be replaced with guard clauses
210
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
211
+ Enabled: false
212
+ MinBodyLength: 1
213
+ Style/HashSyntax:
214
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
215
+ 1, :b => 2 }.'
216
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
217
+ Enabled: true
218
+ EnforcedStyle: ruby19
219
+ SupportedStyles:
220
+ - ruby19
221
+ - hash_rockets
222
+ Style/IfUnlessModifier:
223
+ Description: Favor modifier if/unless usage when you have a single-line body.
224
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
225
+ Enabled: false
226
+ MaxLineLength: 80
227
+ Style/IndentationWidth:
228
+ Description: Use 2 spaces for indentation.
229
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
230
+ Enabled: true
231
+ Width: 2
232
+ Style/IndentHash:
233
+ Description: Checks the indentation of the first key in a hash literal.
234
+ Enabled: true
235
+ EnforcedStyle: special_inside_parentheses
236
+ SupportedStyles:
237
+ - special_inside_parentheses
238
+ - consistent
239
+ Style/LambdaCall:
240
+ Description: Use lambda.call(...) instead of lambda.(...).
241
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
242
+ Enabled: false
243
+ EnforcedStyle: call
244
+ SupportedStyles:
245
+ - call
246
+ - braces
247
+ Style/Next:
248
+ Description: Use `next` to skip iteration instead of a condition at the end.
249
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
250
+ Enabled: false
251
+ EnforcedStyle: skip_modifier_ifs
252
+ MinBodyLength: 3
253
+ SupportedStyles:
254
+ - skip_modifier_ifs
255
+ - always
256
+ Style/NonNilCheck:
257
+ Description: Checks for redundant nil checks.
258
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
259
+ Enabled: true
260
+ IncludeSemanticChanges: false
261
+ Style/MethodDefParentheses:
262
+ Description: Checks if the method definitions have or don't have parentheses.
263
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
264
+ Enabled: true
265
+ EnforcedStyle: require_parentheses
266
+ SupportedStyles:
267
+ - require_parentheses
268
+ - require_no_parentheses
269
+ Style/MethodName:
270
+ Description: Use the configured style when naming methods.
271
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
272
+ Enabled: true
273
+ EnforcedStyle: snake_case
274
+ SupportedStyles:
275
+ - snake_case
276
+ - camelCase
277
+ Style/MultilineOperationIndentation:
278
+ Description: Checks indentation of binary operations that span more than one line.
279
+ Enabled: true
280
+ EnforcedStyle: aligned
281
+ SupportedStyles:
282
+ - aligned
283
+ - indented
284
+ Style/NumericLiterals:
285
+ Description: Add underscores to large numeric literals to improve their readability.
286
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
287
+ Enabled: false
288
+ MinDigits: 5
289
+ Style/OptionHash:
290
+ Description: Don't use option hashes when you can use keyword arguments.
291
+ Enabled: false
292
+ Style/ParenthesesAroundCondition:
293
+ Description: Don't use parentheses around the condition of an if/unless/while.
294
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
295
+ Enabled: true
296
+ AllowSafeAssignment: true
297
+ Style/PercentLiteralDelimiters:
298
+ Description: Use `%`-literal delimiters consistently
299
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
300
+ Enabled: false
301
+ PreferredDelimiters:
302
+ "%": "()"
303
+ "%i": "()"
304
+ "%q": "()"
305
+ "%Q": "()"
306
+ "%r": "{}"
307
+ "%s": "()"
308
+ "%w": "()"
309
+ "%W": "()"
310
+ "%x": "()"
311
+ Style/PercentQLiterals:
312
+ Description: Checks if uses of %Q/%q match the configured preference.
313
+ Enabled: true
314
+ EnforcedStyle: lower_case_q
315
+ SupportedStyles:
316
+ - lower_case_q
317
+ - upper_case_q
318
+ Style/PredicateName:
319
+ Description: Check the names of predicate methods.
320
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
321
+ Enabled: true
322
+ NamePrefix:
323
+ - is_
324
+ - has_
325
+ - have_
326
+ NamePrefixBlacklist:
327
+ - is_
328
+ Exclude:
329
+ - spec/**/*
330
+ Style/RaiseArgs:
331
+ Description: Checks the arguments passed to raise/fail.
332
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
333
+ Enabled: false
334
+ EnforcedStyle: exploded
335
+ SupportedStyles:
336
+ - compact
337
+ - exploded
338
+ Style/RedundantReturn:
339
+ Description: Don't use return where it's not required.
340
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
341
+ Enabled: true
342
+ AllowMultipleReturnValues: false
343
+ Style/RegexpLiteral:
344
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
345
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
346
+ '/' character.
347
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
348
+ Enabled: false
349
+ Style/Semicolon:
350
+ Description: Don't use semicolons to terminate expressions.
351
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
352
+ Enabled: true
353
+ AllowAsExpressionSeparator: false
354
+ Style/SignalException:
355
+ Description: Checks for proper usage of fail and raise.
356
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
357
+ Enabled: false
358
+ EnforcedStyle: semantic
359
+ SupportedStyles:
360
+ - only_raise
361
+ - only_fail
362
+ - semantic
363
+ Style/SingleLineBlockParams:
364
+ Description: Enforces the names of some block params.
365
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
366
+ Enabled: false
367
+ Methods:
368
+ - reduce:
369
+ - a
370
+ - e
371
+ - inject:
372
+ - a
373
+ - e
374
+ Style/SingleLineMethods:
375
+ Description: Avoid single-line methods.
376
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
377
+ Enabled: false
378
+ AllowIfMethodIsEmpty: true
379
+ Style/StringLiterals:
380
+ Description: Checks if uses of quotes match the configured preference.
381
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
382
+ Enabled: true
383
+ EnforcedStyle: double_quotes
384
+ SupportedStyles:
385
+ - single_quotes
386
+ - double_quotes
387
+ Style/StringLiteralsInInterpolation:
388
+ Description: Checks if uses of quotes inside expressions in interpolated strings
389
+ match the configured preference.
390
+ Enabled: true
391
+ EnforcedStyle: double_quotes
392
+ SupportedStyles:
393
+ - single_quotes
394
+ - double_quotes
395
+ Style/StringMethods:
396
+ Description: Checks if configured preferred methods are used over non-preferred.
397
+ Enabled: false
398
+ Style/SpaceAroundBlockParameters:
399
+ Description: Checks the spacing inside and after block parameters pipes.
400
+ Enabled: true
401
+ EnforcedStyleInsidePipes: no_space
402
+ SupportedStyles:
403
+ - space
404
+ - no_space
405
+ Style/SpaceAroundEqualsInParameterDefault:
406
+ Description: Checks that the equals signs in parameter default assignments have
407
+ or don't have surrounding space depending on configuration.
408
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
409
+ Enabled: true
410
+ EnforcedStyle: space
411
+ SupportedStyles:
412
+ - space
413
+ - no_space
414
+ Style/SpaceBeforeBlockBraces:
415
+ Description: Checks that the left block brace has or doesn't have space before it.
416
+ Enabled: true
417
+ EnforcedStyle: space
418
+ SupportedStyles:
419
+ - space
420
+ - no_space
421
+ Style/SpaceInsideBlockBraces:
422
+ Description: Checks that block braces have or don't have surrounding space. For
423
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
424
+ space.
425
+ Enabled: true
426
+ EnforcedStyle: space
427
+ SupportedStyles:
428
+ - space
429
+ - no_space
430
+ EnforcedStyleForEmptyBraces: no_space
431
+ SpaceBeforeBlockParameters: true
432
+ Style/SpaceInsideHashLiteralBraces:
433
+ Description: Use spaces inside hash literal braces - or don't.
434
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
435
+ Enabled: true
436
+ EnforcedStyle: space
437
+ EnforcedStyleForEmptyBraces: no_space
438
+ SupportedStyles:
439
+ - space
440
+ - no_space
441
+ Style/SpaceInsideStringInterpolation:
442
+ EnforcedStyle: no_space
443
+ SupportedStyles:
444
+ - space
445
+ - no_space
446
+ Description: Checks for padding/surrounding spaces inside string interpolation.
447
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
448
+ Enabled: true
449
+ Style/SymbolProc:
450
+ Description: Use symbols as procs instead of blocks when possible.
451
+ Enabled: true
452
+ IgnoredMethods:
453
+ - respond_to
454
+ Style/TrailingBlankLines:
455
+ Description: Checks trailing blank lines and final newline.
456
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
457
+ Enabled: true
458
+ EnforcedStyle: final_newline
459
+ SupportedStyles:
460
+ - final_newline
461
+ - final_blank_line
462
+ Style/TrailingComma:
463
+ Description: Checks for trailing comma in parameter lists and literals.
464
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
465
+ Enabled: false
466
+ EnforcedStyleForMultiline: no_comma
467
+ SupportedStyles:
468
+ - comma
469
+ - no_comma
470
+ Style/TrivialAccessors:
471
+ Description: Prefer attr_* methods to trivial readers/writers.
472
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
473
+ Enabled: false
474
+ ExactNameMatch: false
475
+ AllowPredicates: false
476
+ AllowDSLWriters: false
477
+ Whitelist:
478
+ - to_ary
479
+ - to_a
480
+ - to_c
481
+ - to_enum
482
+ - to_h
483
+ - to_hash
484
+ - to_i
485
+ - to_int
486
+ - to_io
487
+ - to_open
488
+ - to_path
489
+ - to_proc
490
+ - to_r
491
+ - to_regexp
492
+ - to_str
493
+ - to_s
494
+ - to_sym
495
+ Style/VariableName:
496
+ Description: Use the configured style when naming variables.
497
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
498
+ Enabled: true
499
+ EnforcedStyle: snake_case
500
+ SupportedStyles:
501
+ - snake_case
502
+ - camelCase
503
+ Style/WhileUntilModifier:
504
+ Description: Favor modifier while/until usage when you have a single-line body.
505
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
506
+ Enabled: false
507
+ MaxLineLength: 80
508
+ Style/WordArray:
509
+ Description: Use %w or %W for arrays of words.
510
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
511
+ Enabled: false
512
+ MinSize: 0
513
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
514
+ Metrics/AbcSize:
515
+ Description: A calculated magnitude based on number of assignments, branches, and
516
+ conditions.
517
+ Enabled: true
518
+ Max: 15
519
+ Metrics/BlockNesting:
520
+ Description: Avoid excessive block nesting
521
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
522
+ Enabled: false
523
+ Max: 3
524
+ Metrics/ClassLength:
525
+ Description: Avoid classes longer than 100 lines of code.
526
+ Enabled: false
527
+ CountComments: false
528
+ Max: 100
529
+ Metrics/ModuleLength:
530
+ CountComments: false
531
+ Max: 100
532
+ Description: Avoid modules longer than 100 lines of code.
533
+ Enabled: true
534
+ Metrics/CyclomaticComplexity:
535
+ Description: A complexity metric that is strongly correlated to the number of test
536
+ cases needed to validate a method.
537
+ Enabled: false
538
+ Max: 6
539
+ Metrics/LineLength:
540
+ Description: Limit lines to 80 characters.
541
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
542
+ Enabled: false #
543
+ Max: 80
544
+ AllowURI: true
545
+ URISchemes:
546
+ - http
547
+ - https
548
+ Metrics/MethodLength:
549
+ Description: Avoid methods longer than 10 lines of code.
550
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
551
+ Enabled: false
552
+ CountComments: false
553
+ Max: 10
554
+ Metrics/ParameterLists:
555
+ Description: Avoid parameter lists longer than three or four parameters.
556
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
557
+ Enabled: false
558
+ Max: 5
559
+ CountKeywordArgs: true
560
+ Metrics/PerceivedComplexity:
561
+ Description: A complexity metric geared towards measuring complexity for a human
562
+ reader.
563
+ Enabled: false
564
+ Max: 7
565
+ Lint/AssignmentInCondition:
566
+ Description: Don't use assignment in conditions.
567
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
568
+ Enabled: false
569
+ AllowSafeAssignment: true
570
+ Lint/EndAlignment:
571
+ Description: Align ends correctly.
572
+ Enabled: true
573
+ AlignWith: keyword
574
+ SupportedStyles:
575
+ - keyword
576
+ - variable
577
+ Lint/DefEndAlignment:
578
+ Description: Align ends corresponding to defs correctly.
579
+ Enabled: true
580
+ AlignWith: start_of_line
581
+ SupportedStyles:
582
+ - start_of_line
583
+ - def
584
+ Rails/ActionFilter:
585
+ Description: Enforces consistent use of action filter methods.
586
+ Enabled: false
587
+ EnforcedStyle: action
588
+ SupportedStyles:
589
+ - action
590
+ - filter
591
+ Include:
592
+ - app/controllers/**/*.rb
593
+ Rails/Date:
594
+ EnforcedStyle: flexible
595
+ SupportedStyles:
596
+ - strict
597
+ - flexible
598
+ Description: Checks the correct usage of date aware methods, such as Date.today,
599
+ Date.current etc.
600
+ Enabled: true
601
+ Rails/DefaultScope:
602
+ Description: Checks if the argument passed to default_scope is a block.
603
+ Enabled: true
604
+ Include:
605
+ - app/models/**/*.rb
606
+ Rails/FindBy:
607
+ Include:
608
+ - app/models/**/*.rb
609
+ Description: Prefer find_by over where.first.
610
+ Enabled: true
611
+ Rails/FindEach:
612
+ Include:
613
+ - app/models/**/*.rb
614
+ Description: Prefer all.find_each over all.find.
615
+ Enabled: true
616
+ Rails/HasAndBelongsToMany:
617
+ Description: Prefer has_many :through to has_and_belongs_to_many.
618
+ Enabled: true
619
+ Include:
620
+ - app/models/**/*.rb
621
+ Rails/Output:
622
+ Description: Checks for calls to puts, print, etc.
623
+ Enabled: true
624
+ Include:
625
+ - app/**/*.rb
626
+ - config/**/*.rb
627
+ - db/**/*.rb
628
+ - lib/**/*.rb
629
+ Rails/ReadWriteAttribute:
630
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
631
+ Enabled: true
632
+ Include:
633
+ - app/models/**/*.rb
634
+ Rails/ScopeArgs:
635
+ Description: Checks the arguments of ActiveRecord scopes.
636
+ Enabled: true
637
+ Include:
638
+ - app/models/**/*.rb
639
+ Rails/TimeZone:
640
+ EnforcedStyle: flexible
641
+ SupportedStyles:
642
+ - strict
643
+ - flexible
644
+ Description: Checks the correct usage of time zone aware methods.
645
+ StyleGuide: https://github.com/bbatsov/rails-style-guide#time
646
+ Reference: http://danilenko.org/2012/7/6/rails_timezones
647
+ Enabled: true
648
+ Rails/Validation:
649
+ Description: Use validates :attribute, hash of validations.
650
+ Enabled: true
651
+ Include:
652
+ - app/models/**/*.rb
653
+ Style/InlineComment:
654
+ Description: Avoid inline comments.
655
+ Enabled: false
656
+ Style/MethodCalledOnDoEndBlock:
657
+ Description: Avoid chaining a method call on a do...end block.
658
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
659
+ Enabled: false
660
+ Style/MissingElse:
661
+ Description: Require if/case expressions to have an else branches. If enabled, it
662
+ is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will
663
+ conflict with Style/EmptyElse if Style/EmptyElse is configured to style "both"
664
+ Enabled: false
665
+ EnforcedStyle: both
666
+ SupportedStyles:
667
+ - if
668
+ - case
669
+ - both
670
+ Style/MutableConstant:
671
+ Description: Do not assign mutable objects to constants.
672
+ Enabled: false
673
+ Style/SymbolArray:
674
+ Description: Use %i or %I for arrays of symbols.
675
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
676
+ Enabled: false
677
+ Style/ExtraSpacing:
678
+ Description: Do not use unnecessary spacing.
679
+ Enabled: true
680
+ Style/AccessorMethodName:
681
+ Description: Check the naming of accessor methods for get_/set_.
682
+ Enabled: false
683
+ Style/Alias:
684
+ Description: Use alias_method instead of alias.
685
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
686
+ Enabled: false
687
+ Style/AlignArray:
688
+ Description: Align the elements of an array literal if they span more than one line.
689
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
690
+ Enabled: true
691
+ Style/ArrayJoin:
692
+ Description: Use Array#join instead of Array#*.
693
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
694
+ Enabled: false
695
+ Style/AsciiComments:
696
+ Description: Use only ascii symbols in comments.
697
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
698
+ Enabled: false
699
+ Style/AsciiIdentifiers:
700
+ Description: Use only ascii symbols in identifiers.
701
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
702
+ Enabled: false
703
+ Style/Attr:
704
+ Description: Checks for uses of Module#attr.
705
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
706
+ Enabled: false
707
+ Style/BeginBlock:
708
+ Description: Avoid the use of BEGIN blocks.
709
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
710
+ Enabled: true
711
+ Style/BlockComments:
712
+ Description: Do not use block comments.
713
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
714
+ Enabled: true
715
+ Style/BlockEndNewline:
716
+ Description: Put end statement of multiline block on its own line.
717
+ Enabled: true
718
+ Style/BlockDelimiters:
719
+ EnforcedStyle: line_count_based
720
+ SupportedStyles:
721
+ - line_count_based
722
+ - semantic
723
+ ProceduralMethods:
724
+ - benchmark
725
+ - bm
726
+ - bmbm
727
+ - create
728
+ - each_with_object
729
+ - measure
730
+ - new
731
+ - realtime
732
+ - tap
733
+ - with_object
734
+ FunctionalMethods:
735
+ - let
736
+ - let!
737
+ - subject
738
+ - watch
739
+ IgnoredMethods:
740
+ - lambda
741
+ - proc
742
+ - it
743
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
744
+ ugly). Prefer {...} over do...end for single-line blocks.
745
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
746
+ Enabled: true
747
+ Style/CaseEquality:
748
+ Description: Avoid explicit use of the case equality operator(===).
749
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
750
+ Enabled: false
751
+ Style/CharacterLiteral:
752
+ Description: Checks for uses of character literals.
753
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
754
+ Enabled: false
755
+ Style/ClassAndModuleCamelCase:
756
+ Description: Use CamelCase for classes and modules.
757
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
758
+ Enabled: true
759
+ Style/ClassMethods:
760
+ Description: Use self when defining module/class methods.
761
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
762
+ Enabled: true
763
+ Style/ClassVars:
764
+ Description: Avoid the use of class variables.
765
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
766
+ Enabled: false
767
+ Style/ClosingParenthesisIndentation:
768
+ Description: Checks the indentation of hanging closing parentheses.
769
+ Enabled: true
770
+ Style/ColonMethodCall:
771
+ Description: 'Do not use :: for method call.'
772
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
773
+ Enabled: false
774
+ Style/CommentIndentation:
775
+ Description: Indentation of comments.
776
+ Enabled: true
777
+ Style/ConstantName:
778
+ Description: Constants should use SCREAMING_SNAKE_CASE.
779
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
780
+ Enabled: true
781
+ Style/DefWithParentheses:
782
+ Description: Use def with parentheses when there are arguments.
783
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
784
+ Enabled: true
785
+ Style/DeprecatedHashMethods:
786
+ Description: Checks for use of deprecated Hash methods.
787
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
788
+ Enabled: false
789
+ Style/Documentation:
790
+ Description: Document classes and non-namespace modules.
791
+ Enabled: false
792
+ Style/DoubleNegation:
793
+ Description: Checks for uses of double negation (!!).
794
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
795
+ Enabled: false
796
+ Style/EachWithObject:
797
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
798
+ Enabled: false
799
+ Style/ElseAlignment:
800
+ Description: Align elses and elsifs correctly.
801
+ Enabled: true
802
+ Style/EmptyElse:
803
+ Description: Avoid empty else-clauses.
804
+ Enabled: true
805
+ Style/EmptyLines:
806
+ Description: Don't use several empty lines in a row.
807
+ Enabled: true
808
+ Style/EmptyLinesAroundAccessModifier:
809
+ Description: Keep blank lines around access modifiers.
810
+ Enabled: true
811
+ Style/EmptyLinesAroundMethodBody:
812
+ Description: Keeps track of empty lines around method bodies.
813
+ Enabled: true
814
+ Style/EmptyLiteral:
815
+ Description: Prefer literals to Array.new/Hash.new/String.new.
816
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
817
+ Enabled: false
818
+ Style/EndBlock:
819
+ Description: Avoid the use of END blocks.
820
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
821
+ Enabled: true
822
+ Style/EndOfLine:
823
+ Description: Use Unix-style line endings.
824
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
825
+ Enabled: true
826
+ Style/EvenOdd:
827
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
828
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
829
+ Enabled: false
830
+ Style/InitialIndentation:
831
+ Description: Checks the indentation of the first non-blank non-comment line in a
832
+ file.
833
+ Enabled: true
834
+ Style/FlipFlop:
835
+ Description: Checks for flip flops
836
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
837
+ Enabled: false
838
+ Style/IfWithSemicolon:
839
+ Description: Do not use if x; .... Use the ternary operator instead.
840
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
841
+ Enabled: false
842
+ Style/IndentationConsistency:
843
+ Description: Keep indentation straight.
844
+ Enabled: true
845
+ Style/IndentArray:
846
+ Description: Checks the indentation of the first element in an array literal.
847
+ Enabled: true
848
+ Style/InfiniteLoop:
849
+ Description: Use Kernel#loop for infinite loops.
850
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
851
+ Enabled: true
852
+ Style/Lambda:
853
+ Description: Use the new lambda literal syntax for single-line blocks.
854
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
855
+ Enabled: false
856
+ Style/LeadingCommentSpace:
857
+ Description: Comments should start with a space.
858
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
859
+ Enabled: true
860
+ Style/LineEndConcatenation:
861
+ Description: Use \ instead of + or << to concatenate two string literals at line
862
+ end.
863
+ Enabled: false
864
+ Style/MethodCallParentheses:
865
+ Description: Do not use parentheses for method calls with no arguments.
866
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
867
+ Enabled: true
868
+ Style/ModuleFunction:
869
+ Description: Checks for usage of `extend self` in modules.
870
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
871
+ Enabled: false
872
+ Style/MultilineBlockChain:
873
+ Description: Avoid multi-line chains of blocks.
874
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
875
+ Enabled: true
876
+ Style/MultilineBlockLayout:
877
+ Description: Ensures newlines after multiline block do statements.
878
+ Enabled: true
879
+ Style/MultilineIfThen:
880
+ Description: Do not use then for multi-line if/unless.
881
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
882
+ Enabled: true
883
+ Style/MultilineTernaryOperator:
884
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
885
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
886
+ Enabled: true
887
+ Style/NegatedIf:
888
+ Description: Favor unless over if for negative conditions (or control flow or).
889
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
890
+ Enabled: false
891
+ Style/NegatedWhile:
892
+ Description: Favor until over while for negative conditions.
893
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
894
+ Enabled: false
895
+ Style/NestedTernaryOperator:
896
+ Description: Use one expression per branch in a ternary operator.
897
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
898
+ Enabled: true
899
+ Style/NilComparison:
900
+ Description: Prefer x.nil? to x == nil.
901
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
902
+ Enabled: false
903
+ Style/Not:
904
+ Description: Use ! instead of not.
905
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
906
+ Enabled: false
907
+ Style/OneLineConditional:
908
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
909
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
910
+ Enabled: false
911
+ Style/OpMethod:
912
+ Description: When defining binary operators, name the argument other.
913
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
914
+ Enabled: false
915
+ Style/OptionalArguments:
916
+ Description: Checks for optional arguments that do not appear at the end of the
917
+ argument list
918
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
919
+ Enabled: true
920
+ Style/ParallelAssignment:
921
+ Description: Check for simple usages of parallel assignment. It will only warn when
922
+ the number of variables matches on both sides of the assignment.
923
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
924
+ Enabled: true
925
+ Style/PerlBackrefs:
926
+ Description: Avoid Perl-style regex back references.
927
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
928
+ Enabled: false
929
+ Style/Proc:
930
+ Description: Use proc instead of Proc.new.
931
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
932
+ Enabled: false
933
+ Style/RedundantBegin:
934
+ Description: Don't use begin blocks when they are not needed.
935
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
936
+ Enabled: true
937
+ Style/RedundantException:
938
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
939
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
940
+ Enabled: true
941
+ Style/RedundantFreeze:
942
+ Description: Checks usages of Object#freeze on immutable objects.
943
+ Enabled: true
944
+ Style/RedundantSelf:
945
+ Description: Don't use self where it's not needed.
946
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
947
+ Enabled: true
948
+ Style/RescueEnsureAlignment:
949
+ Description: Align rescues and ensures correctly.
950
+ Enabled: true
951
+ Style/RescueModifier:
952
+ Description: Avoid using rescue in its modifier form.
953
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
954
+ Enabled: true
955
+ Style/SelfAssignment:
956
+ Description: Checks for places where self-assignment shorthand should have been
957
+ used.
958
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
959
+ Enabled: false
960
+ Style/Send:
961
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
962
+ may overlap with existing methods.
963
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
964
+ Enabled: false
965
+ Style/SingleSpaceBeforeFirstArg:
966
+ Description: Checks that exactly one space is used between a method name and the
967
+ first argument for method calls without parentheses.
968
+ Enabled: true
969
+ Style/SpaceAfterColon:
970
+ Description: Use spaces after colons.
971
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
972
+ Enabled: true
973
+ Style/SpaceAfterComma:
974
+ Description: Use spaces after commas.
975
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
976
+ Enabled: true
977
+ Style/SpaceAfterControlKeyword:
978
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
979
+ Enabled: true
980
+ Style/SpaceAfterMethodName:
981
+ Description: Do not put a space between a method name and the opening parenthesis
982
+ in a method definition.
983
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
984
+ Enabled: true
985
+ Style/SpaceAfterNot:
986
+ Description: Tracks redundant space after the ! operator.
987
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
988
+ Enabled: true
989
+ Style/SpaceAfterSemicolon:
990
+ Description: Use spaces after semicolons.
991
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
992
+ Enabled: true
993
+ Style/SpaceBeforeComma:
994
+ Description: No spaces before commas.
995
+ Enabled: true
996
+ Style/SpaceBeforeComment:
997
+ Description: Checks for missing space between code and a comment on the same line.
998
+ Enabled: true
999
+ Style/SpaceBeforeSemicolon:
1000
+ Description: No spaces before semicolons.
1001
+ Enabled: true
1002
+ Style/SpaceAroundOperators:
1003
+ Description: Use spaces around operators.
1004
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
1005
+ Enabled: true
1006
+ Style/SpaceBeforeModifierKeyword:
1007
+ Description: Put a space before the modifier keyword.
1008
+ Enabled: true
1009
+ Style/SpaceInsideBrackets:
1010
+ Description: No spaces after [ or before ].
1011
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
1012
+ Enabled: true
1013
+ Style/SpaceInsideParens:
1014
+ Description: No spaces after ( or before ).
1015
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
1016
+ Enabled: true
1017
+ Style/SpaceInsideRangeLiteral:
1018
+ Description: No spaces inside range literals.
1019
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
1020
+ Enabled: true
1021
+ Style/SpecialGlobalVars:
1022
+ Description: Avoid Perl-style global variables.
1023
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
1024
+ Enabled: false
1025
+ Style/StructInheritance:
1026
+ Description: Checks for inheritance from Struct.new.
1027
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
1028
+ Enabled: true
1029
+ Style/SymbolLiteral:
1030
+ Description: Use plain symbols instead of string symbols when possible.
1031
+ Enabled: true
1032
+ Style/Tab:
1033
+ Description: No hard tabs.
1034
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
1035
+ Enabled: true
1036
+ Style/TrailingWhitespace:
1037
+ Description: Avoid trailing whitespace.
1038
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
1039
+ Enabled: true
1040
+ Style/UnlessElse:
1041
+ Description: Do not use unless with else. Rewrite these with the positive case first.
1042
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
1043
+ Enabled: true
1044
+ Style/UnneededCapitalW:
1045
+ Description: Checks for %W when interpolation is not needed.
1046
+ Enabled: true
1047
+ Style/UnneededPercentQ:
1048
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
1049
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
1050
+ Enabled: true
1051
+ Style/TrailingUnderscoreVariable:
1052
+ Description: Checks for the usage of unneeded trailing underscores at the end of
1053
+ parallel variable assignment.
1054
+ Enabled: true
1055
+ Style/CommandLiteral:
1056
+ EnforcedStyle: backticks
1057
+ SupportedStyles:
1058
+ - backticks
1059
+ - percent_x
1060
+ - mixed
1061
+ AllowInnerBackticks: false
1062
+ Description: Use `` or %x around command literals.
1063
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
1064
+ Enabled: true
1065
+ Style/VariableInterpolation:
1066
+ Description: Don't interpolate global, instance and class variables directly in
1067
+ strings.
1068
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
1069
+ Enabled: false
1070
+ Style/WhenThen:
1071
+ Description: Use when x then ... for one-line cases.
1072
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
1073
+ Enabled: false
1074
+ Style/WhileUntilDo:
1075
+ Description: Checks for redundant do after while or until.
1076
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
1077
+ Enabled: true
1078
+ Lint/AmbiguousOperator:
1079
+ Description: Checks for ambiguous operators in the first argument of a method invocation
1080
+ without parentheses.
1081
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
1082
+ Enabled: false
1083
+ Lint/AmbiguousRegexpLiteral:
1084
+ Description: Checks for ambiguous regexp literals in the first argument of a method
1085
+ invocation without parenthesis.
1086
+ Enabled: false
1087
+ Lint/BlockAlignment:
1088
+ Description: Align block ends correctly.
1089
+ Enabled: true
1090
+ Lint/CircularArgumentReference:
1091
+ Description: Don't refer to the keyword argument in the default value.
1092
+ Enabled: true
1093
+ Lint/ConditionPosition:
1094
+ Description: Checks for condition placed in a confusing position relative to the
1095
+ keyword.
1096
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
1097
+ Enabled: false
1098
+ Lint/Debugger:
1099
+ Description: Check for debugger calls.
1100
+ Enabled: true
1101
+ Lint/DeprecatedClassMethods:
1102
+ Description: Check for deprecated class method calls.
1103
+ Enabled: false
1104
+ Lint/DuplicateMethods:
1105
+ Description: Check for duplicate methods calls.
1106
+ Enabled: true
1107
+ Lint/DuplicatedKey:
1108
+ Description: Check for duplicate keys in hash literals.
1109
+ Enabled: true
1110
+ Lint/EachWithObjectArgument:
1111
+ Description: Check for immutable argument given to each_with_object.
1112
+ Enabled: true
1113
+ Lint/ElseLayout:
1114
+ Description: Check for odd code arrangement in an else block.
1115
+ Enabled: false
1116
+ Lint/EmptyEnsure:
1117
+ Description: Checks for empty ensure block.
1118
+ Enabled: true
1119
+ Lint/EmptyInterpolation:
1120
+ Description: Checks for empty string interpolation.
1121
+ Enabled: true
1122
+ Lint/EndInMethod:
1123
+ Description: END blocks should not be placed inside method definitions.
1124
+ Enabled: true
1125
+ Lint/EnsureReturn:
1126
+ Description: Do not use return in an ensure block.
1127
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
1128
+ Enabled: true
1129
+ Lint/Eval:
1130
+ Description: The use of eval represents a serious security risk.
1131
+ Enabled: true
1132
+ Lint/FormatParameterMismatch:
1133
+ Description: The number of parameters to format/sprint must match the fields.
1134
+ Enabled: true
1135
+ Lint/HandleExceptions:
1136
+ Description: Don't suppress exception.
1137
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
1138
+ Enabled: false
1139
+ Lint/InvalidCharacterLiteral:
1140
+ Description: Checks for invalid character literals with a non-escaped whitespace
1141
+ character.
1142
+ Enabled: false
1143
+ Lint/LiteralInCondition:
1144
+ Description: Checks of literals used in conditions.
1145
+ Enabled: false
1146
+ Lint/LiteralInInterpolation:
1147
+ Description: Checks for literals used in interpolation.
1148
+ Enabled: false
1149
+ Lint/Loop:
1150
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1151
+ for post-loop tests.
1152
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1153
+ Enabled: false
1154
+ Lint/NestedMethodDefinition:
1155
+ Description: Do not use nested method definitions.
1156
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
1157
+ Enabled: true
1158
+ Lint/NonLocalExitFromIterator:
1159
+ Description: Do not use return in iterator to cause non-local exit.
1160
+ Enabled: true
1161
+ Lint/ParenthesesAsGroupedExpression:
1162
+ Description: Checks for method calls with a space before the opening parenthesis.
1163
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1164
+ Enabled: false
1165
+ Lint/RequireParentheses:
1166
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1167
+ Enabled: false
1168
+ Lint/RescueException:
1169
+ Description: Avoid rescuing the Exception class.
1170
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1171
+ Enabled: true
1172
+ Lint/ShadowingOuterLocalVariable:
1173
+ Description: Do not use the same name as outer local variable for block arguments
1174
+ or block local variables.
1175
+ Enabled: true
1176
+ Lint/SpaceBeforeFirstArg:
1177
+ Description: Put a space between a method name and the first argument in a method
1178
+ call without parentheses.
1179
+ Enabled: true
1180
+ Lint/StringConversionInInterpolation:
1181
+ Description: Checks for Object#to_s usage in string interpolation.
1182
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1183
+ Enabled: true
1184
+ Lint/UnderscorePrefixedVariableName:
1185
+ Description: Do not use prefix `_` for a variable that is used.
1186
+ Enabled: false
1187
+ Lint/UnneededDisable:
1188
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
1189
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
1190
+ Enabled: true
1191
+ Lint/UnusedBlockArgument:
1192
+ Description: Checks for unused block arguments.
1193
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1194
+ Enabled: true
1195
+ Lint/UnusedMethodArgument:
1196
+ Description: Checks for unused method arguments.
1197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1198
+ Enabled: true
1199
+ Lint/UnreachableCode:
1200
+ Description: Unreachable code.
1201
+ Enabled: true
1202
+ Lint/UselessAccessModifier:
1203
+ Description: Checks for useless access modifiers.
1204
+ Enabled: true
1205
+ Lint/UselessAssignment:
1206
+ Description: Checks for useless assignment to a local variable.
1207
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1208
+ Enabled: true
1209
+ Lint/UselessComparison:
1210
+ Description: Checks for comparison of something with itself.
1211
+ Enabled: true
1212
+ Lint/UselessElseWithoutRescue:
1213
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1214
+ Enabled: true
1215
+ Lint/UselessSetterCall:
1216
+ Description: Checks for useless setter call to a local variable.
1217
+ Enabled: true
1218
+ Lint/Void:
1219
+ Description: Possible use of operator/literal/variable in void context.
1220
+ Enabled: false
1221
+ Performance/CaseWhenSplat:
1222
+ Description: Place `when` conditions that use splat at the end of the list of `when`
1223
+ branches.
1224
+ Enabled: true
1225
+ Performance/Count:
1226
+ Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
1227
+ `reject...count`, `select...length`, and `reject...length`.
1228
+ Enabled: true
1229
+ Performance/Detect:
1230
+ Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
1231
+ and `find_all.last`.
1232
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
1233
+ Enabled: true
1234
+ Performance/FlatMap:
1235
+ Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
1236
+ or `Enumberable#collect..Array#flatten(1)`
1237
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
1238
+ Enabled: true
1239
+ EnabledForFlattenWithoutParams: false
1240
+ Performance/ReverseEach:
1241
+ Description: Use `reverse_each` instead of `reverse.each`.
1242
+ Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
1243
+ Enabled: true
1244
+ Performance/Sample:
1245
+ Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
1246
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
1247
+ Enabled: true
1248
+ Performance/Size:
1249
+ Description: Use `size` instead of `count` for counting the number of elements in
1250
+ `Array` and `Hash`.
1251
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
1252
+ Enabled: true
1253
+ Performance/StringReplacement:
1254
+ Description: Use `tr` instead of `gsub` when you are replacing the same number of
1255
+ characters. Use `delete` instead of `gsub` when you are deleting characters.
1256
+ Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
1257
+ Enabled: true
1258
+ Rails/Delegate:
1259
+ Description: Prefer delegate method for delegations.
1260
+ Enabled: false