handshake-style 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 75d1d2216eb9dae835f9658add50a87df8cef05b
4
+ data.tar.gz: f29ee97015d5b9d5d0b5d76e8bfccfc51bc88acc
5
+ SHA512:
6
+ metadata.gz: b85f9970a927ad9ee2cbae21b6745a73165f1f74073c19b532c6f4a4c54ab7d5375a8491c04e2e519f0b9b1cc079fa633230bfaac03d675b012626bd807e302b
7
+ data.tar.gz: 0f7b930840005c786d6ddfc70cf11aa5d1a5ddc2aca4e7ff8bda8f7eb038a3adf6b556e5ffb3859c43301c046ea377a2a4df72576a2fdcff5d6d01e59c623538
data/.default.yml ADDED
@@ -0,0 +1,1608 @@
1
+ # This is the default configuration file. Enabling and disabling is configured
2
+ # in separate files. This file adds all other parameters apart from Enabled.
3
+
4
+ # Common configuration.
5
+ AllCops:
6
+ # Include common Ruby source files.
7
+ Include:
8
+ - '**/*.builder'
9
+ - '**/*.fcgi'
10
+ - '**/*.gemspec'
11
+ - '**/*.god'
12
+ - '**/*.jb'
13
+ - '**/*.jbuilder'
14
+ - '**/*.mspec'
15
+ - '**/*.opal'
16
+ - '**/*.pluginspec'
17
+ - '**/*.podspec'
18
+ - '**/*.rabl'
19
+ - '**/*.rake'
20
+ - '**/*.rbuild'
21
+ - '**/*.rbw'
22
+ - '**/*.rbx'
23
+ - '**/*.ru'
24
+ - '**/*.ruby'
25
+ - '**/*.spec'
26
+ - '**/*.thor'
27
+ - '**/*.watchr'
28
+ - '**/.irbrc'
29
+ - '**/.pryrc'
30
+ - '**/buildfile'
31
+ - '**/config.ru'
32
+ - '**/Appraisals'
33
+ - '**/Berksfile'
34
+ - '**/Brewfile'
35
+ - '**/Buildfile'
36
+ - '**/Capfile'
37
+ - '**/Cheffile'
38
+ - '**/Dangerfile'
39
+ - '**/Deliverfile'
40
+ - '**/Fastfile'
41
+ - '**/*Fastfile'
42
+ - '**/Gemfile'
43
+ - '**/Guardfile'
44
+ - '**/Jarfile'
45
+ - '**/Mavenfile'
46
+ - '**/Podfile'
47
+ - '**/Puppetfile'
48
+ - '**/Rakefile'
49
+ - '**/Snapfile'
50
+ - '**/Thorfile'
51
+ - '**/Vagabondfile'
52
+ - '**/Vagrantfile'
53
+ Exclude:
54
+ - 'node_modules/**/*'
55
+ - 'vendor/**/*'
56
+ # Default formatter will be used if no `-f/--format` option is given.
57
+ DefaultFormatter: progress
58
+ # Cop names are not displayed in offense messages by default. Change behavior
59
+ # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
60
+ # option.
61
+ DisplayCopNames: false
62
+ # Style guide URLs are not displayed in offense messages by default. Change
63
+ # behavior by overriding `DisplayStyleGuide`, or by giving the
64
+ # `-S/--display-style-guide` option.
65
+ DisplayStyleGuide: false
66
+ # When specifying style guide URLs, any paths and/or fragments will be
67
+ # evaluated relative to the base URL.
68
+ StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
69
+ # Extra details are not displayed in offense messages by default. Change
70
+ # behavior by overriding ExtraDetails, or by giving the
71
+ # `-E/--extra-details` option.
72
+ ExtraDetails: false
73
+ # Additional cops that do not reference a style guide rule may be enabled by
74
+ # default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
75
+ # the `--only-guide-cops` option.
76
+ StyleGuideCopsOnly: false
77
+ # All cops except the ones in disabled.yml are enabled by default. Change
78
+ # this behavior by overriding either `DisabledByDefault` or `EnabledByDefault`.
79
+ # When `DisabledByDefault` is `true`, all cops in the default configuration
80
+ # are disabled, and only cops in user configuration are enabled. This makes
81
+ # cops opt-in instead of opt-out. Note that when `DisabledByDefault` is `true`,
82
+ # cops in user configuration will be enabled even if they don't set the
83
+ # Enabled parameter.
84
+ # When `EnabledByDefault` is `true`, all cops, even those in disabled.yml,
85
+ # are enabled by default. Cops can still be disabled in user configuration.
86
+ # Note that it is invalid to set both EnabledByDefault and DisabledByDefault
87
+ # to true in the same configuration.
88
+ EnabledByDefault: false
89
+ DisabledByDefault: false
90
+ # Enables the result cache if `true`. Can be overridden by the `--cache` command
91
+ # line option.
92
+ UseCache: true
93
+ # Threshold for how many files can be stored in the result cache before some
94
+ # of the files are automatically removed.
95
+ MaxFilesInCache: 20000
96
+ # The cache will be stored in "rubocop_cache" under this directory. If
97
+ # CacheRootDirectory is ~ (nil), which it is by default, the root will be
98
+ # taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
99
+ # `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
100
+ CacheRootDirectory: ~
101
+ # It is possible for a malicious user to know the location of RuboCop's cache
102
+ # directory by looking at CacheRootDirectory, and create a symlink in its
103
+ # place that could cause RuboCop to overwrite unintended files, or read
104
+ # malicious input. If you are certain that your cache location is secure from
105
+ # this kind of attack, and wish to use a symlinked cache location, set this
106
+ # value to "true".
107
+ AllowSymlinksInCacheRootDirectory: false
108
+ # What MRI version of the Ruby interpreter is the inspected code intended to
109
+ # run on? (If there is more than one, set this to the lowest version.)
110
+ # If a value is specified for TargetRubyVersion then it is used.
111
+ # Else if .ruby-version exists and it contains an MRI version it is used.
112
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
113
+ TargetRubyVersion: ~
114
+ TargetRailsVersion: 5.0
115
+
116
+ #################### Layout ###########################
117
+
118
+ # Indent private/protected/public as deep as method definitions
119
+ Layout/AccessModifierIndentation:
120
+ EnforcedStyle: indent
121
+ SupportedStyles:
122
+ - outdent
123
+ - indent
124
+ # By default, the indentation width from Layout/IndentationWidth is used
125
+ # But it can be overridden by setting this parameter
126
+ IndentationWidth: ~
127
+
128
+ # Align the elements of a hash literal if they span more than one line.
129
+ Layout/AlignHash:
130
+ # Alignment of entries using hash rocket as separator. Valid values are:
131
+ #
132
+ # key - left alignment of keys
133
+ # 'a' => 2
134
+ # 'bb' => 3
135
+ # separator - alignment of hash rockets, keys are right aligned
136
+ # 'a' => 2
137
+ # 'bb' => 3
138
+ # table - left alignment of keys, hash rockets, and values
139
+ # 'a' => 2
140
+ # 'bb' => 3
141
+ EnforcedHashRocketStyle: key
142
+ SupportedHashRocketStyles:
143
+ - key
144
+ - separator
145
+ - table
146
+ # Alignment of entries using colon as separator. Valid values are:
147
+ #
148
+ # key - left alignment of keys
149
+ # a: 0
150
+ # bb: 1
151
+ # separator - alignment of colons, keys are right aligned
152
+ # a: 0
153
+ # bb: 1
154
+ # table - left alignment of keys and values
155
+ # a: 0
156
+ # bb: 1
157
+ EnforcedColonStyle: key
158
+ SupportedColonStyles:
159
+ - key
160
+ - separator
161
+ - table
162
+ # Select whether hashes that are the last argument in a method call should be
163
+ # inspected? Valid values are:
164
+ #
165
+ # always_inspect - Inspect both implicit and explicit hashes.
166
+ # Registers an offense for:
167
+ # function(a: 1,
168
+ # b: 2)
169
+ # Registers an offense for:
170
+ # function({a: 1,
171
+ # b: 2})
172
+ # always_ignore - Ignore both implicit and explicit hashes.
173
+ # Accepts:
174
+ # function(a: 1,
175
+ # b: 2)
176
+ # Accepts:
177
+ # function({a: 1,
178
+ # b: 2})
179
+ # ignore_implicit - Ignore only implicit hashes.
180
+ # Accepts:
181
+ # function(a: 1,
182
+ # b: 2)
183
+ # Registers an offense for:
184
+ # function({a: 1,
185
+ # b: 2})
186
+ # ignore_explicit - Ignore only explicit hashes.
187
+ # Accepts:
188
+ # function({a: 1,
189
+ # b: 2})
190
+ # Registers an offense for:
191
+ # function(a: 1,
192
+ # b: 2)
193
+ EnforcedLastArgumentHashStyle: always_inspect
194
+ SupportedLastArgumentHashStyles:
195
+ - always_inspect
196
+ - always_ignore
197
+ - ignore_implicit
198
+ - ignore_explicit
199
+
200
+ Layout/AlignParameters:
201
+ # Alignment of parameters in multi-line method calls.
202
+ #
203
+ # The `with_first_parameter` style aligns the following lines along the same
204
+ # column as the first parameter.
205
+ #
206
+ # method_call(a,
207
+ # b)
208
+ #
209
+ # The `with_fixed_indentation` style aligns the following lines with one
210
+ # level of indentation relative to the start of the line with the method call.
211
+ #
212
+ # method_call(a,
213
+ # b)
214
+ EnforcedStyle: with_first_parameter
215
+ SupportedStyles:
216
+ - with_first_parameter
217
+ - with_fixed_indentation
218
+ # By default, the indentation width from Layout/IndentationWidth is used
219
+ # But it can be overridden by setting this parameter
220
+ IndentationWidth: ~
221
+
222
+ # Indentation of `when`.
223
+ Layout/CaseIndentation:
224
+ EnforcedStyle: case
225
+ SupportedStyles:
226
+ - case
227
+ - end
228
+ IndentOneStep: false
229
+ # By default, the indentation width from `Layout/IndentationWidth` is used.
230
+ # But it can be overridden by setting this parameter.
231
+ # This only matters if `IndentOneStep` is `true`
232
+ IndentationWidth: ~
233
+
234
+ # Multi-line method chaining should be done with leading dots.
235
+ Layout/DotPosition:
236
+ EnforcedStyle: leading
237
+ SupportedStyles:
238
+ - leading
239
+ - trailing
240
+
241
+ # Use empty lines between defs.
242
+ Layout/EmptyLineBetweenDefs:
243
+ # If `true`, this parameter means that single line method definitions don't
244
+ # need an empty line between them.
245
+ AllowAdjacentOneLineDefs: false
246
+ # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
247
+ NumberOfEmptyLines: 1
248
+
249
+ Layout/EmptyLinesAroundBlockBody:
250
+ EnforcedStyle: no_empty_lines
251
+ SupportedStyles:
252
+ - empty_lines
253
+ - no_empty_lines
254
+
255
+ Layout/EmptyLinesAroundClassBody:
256
+ EnforcedStyle: no_empty_lines
257
+ SupportedStyles:
258
+ - empty_lines
259
+ - empty_lines_except_namespace
260
+ - empty_lines_special
261
+ - no_empty_lines
262
+
263
+ Layout/EmptyLinesAroundModuleBody:
264
+ EnforcedStyle: no_empty_lines
265
+ SupportedStyles:
266
+ - empty_lines
267
+ - empty_lines_except_namespace
268
+ - empty_lines_special
269
+ - no_empty_lines
270
+
271
+ Layout/EndOfLine:
272
+ # The `native` style means that CR+LF (Carriage Return + Line Feed) is
273
+ # enforced on Windows, and LF is enforced on other platforms. The other styles
274
+ # mean LF and CR+LF, respectively.
275
+ EnforcedStyle: native
276
+ SupportedStyles:
277
+ - native
278
+ - lf
279
+ - crlf
280
+
281
+ Layout/ExtraSpacing:
282
+ # When true, allows most uses of extra spacing if the intent is to align
283
+ # things with the previous or next line, not counting empty lines or comment
284
+ # lines.
285
+ AllowForAlignment: true
286
+ # When true, forces the alignment of `=` in assignments on consecutive lines.
287
+ ForceEqualSignAlignment: false
288
+
289
+ Layout/FirstParameterIndentation:
290
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
291
+ SupportedStyles:
292
+ # The first parameter should always be indented one step more than the
293
+ # preceding line.
294
+ - consistent
295
+ # The first parameter should normally be indented one step more than the
296
+ # preceding line, but if it's a parameter for a method call that is itself
297
+ # a parameter in a method call, then the inner parameter should be indented
298
+ # relative to the inner method.
299
+ - special_for_inner_method_call
300
+ # Same as `special_for_inner_method_call` except that the special rule only
301
+ # applies if the outer method call encloses its arguments in parentheses.
302
+ - special_for_inner_method_call_in_parentheses
303
+ # By default, the indentation width from `Layout/IndentationWidth` is used
304
+ # But it can be overridden by setting this parameter
305
+ IndentationWidth: ~
306
+
307
+ Layout/IndentationConsistency:
308
+ # The difference between `rails` and `normal` is that the `rails` style
309
+ # prescribes that in classes and modules the `protected` and `private`
310
+ # modifier keywords shall be indented the same as public methods and that
311
+ # protected and private members shall be indented one step more than the
312
+ # modifiers. Other than that, both styles mean that entities on the same
313
+ # logical depth shall have the same indentation.
314
+ EnforcedStyle: normal
315
+ SupportedStyles:
316
+ - normal
317
+ - rails
318
+
319
+ Layout/IndentationWidth:
320
+ # Number of spaces for each indentation level.
321
+ Width: 2
322
+ IgnoredPatterns: []
323
+
324
+ # Checks the indentation of the first element in an array literal.
325
+ Layout/IndentArray:
326
+ # The value `special_inside_parentheses` means that array literals with
327
+ # brackets that have their opening bracket on the same line as a surrounding
328
+ # opening round parenthesis, shall have their first element indented relative
329
+ # to the first position inside the parenthesis.
330
+ #
331
+ # The value `consistent` means that the indentation of the first element shall
332
+ # always be relative to the first position of the line where the opening
333
+ # bracket is.
334
+ #
335
+ # The value `align_brackets` means that the indentation of the first element
336
+ # shall always be relative to the position of the opening bracket.
337
+ EnforcedStyle: special_inside_parentheses
338
+ SupportedStyles:
339
+ - special_inside_parentheses
340
+ - consistent
341
+ - align_brackets
342
+ # By default, the indentation width from `Layout/IndentationWidth` is used
343
+ # But it can be overridden by setting this parameter
344
+ IndentationWidth: ~
345
+
346
+ # Checks the indentation of assignment RHS, when on a different line from LHS
347
+ Layout/IndentAssignment:
348
+ # By default, the indentation width from `Layout/IndentationWidth` is used
349
+ # But it can be overridden by setting this parameter
350
+ IndentationWidth: ~
351
+
352
+ # Checks the indentation of the first key in a hash literal.
353
+ Layout/IndentHash:
354
+ # The value `special_inside_parentheses` means that hash literals with braces
355
+ # that have their opening brace on the same line as a surrounding opening
356
+ # round parenthesis, shall have their first key indented relative to the
357
+ # first position inside the parenthesis.
358
+ #
359
+ # The value `consistent` means that the indentation of the first key shall
360
+ # always be relative to the first position of the line where the opening
361
+ # brace is.
362
+ #
363
+ # The value `align_braces` means that the indentation of the first key shall
364
+ # always be relative to the position of the opening brace.
365
+ EnforcedStyle: special_inside_parentheses
366
+ SupportedStyles:
367
+ - special_inside_parentheses
368
+ - consistent
369
+ - align_braces
370
+ # By default, the indentation width from `Layout/IndentationWidth` is used
371
+ # But it can be overridden by setting this parameter
372
+ IndentationWidth: ~
373
+
374
+ Layout/IndentHeredoc:
375
+ EnforcedStyle: auto_detection
376
+ SupportedStyles:
377
+ - auto_detection
378
+ - squiggly
379
+ - active_support
380
+ - powerpack
381
+ - unindent
382
+
383
+ Layout/SpaceInLambdaLiteral:
384
+ EnforcedStyle: require_no_space
385
+ SupportedStyles:
386
+ - require_no_space
387
+ - require_space
388
+
389
+ Layout/MultilineArrayBraceLayout:
390
+ EnforcedStyle: symmetrical
391
+ SupportedStyles:
392
+ # symmetrical: closing brace is positioned in same way as opening brace
393
+ # new_line: closing brace is always on a new line
394
+ # same_line: closing brace is always on the same line as last element
395
+ - symmetrical
396
+ - new_line
397
+ - same_line
398
+
399
+ Layout/MultilineAssignmentLayout:
400
+ # The types of assignments which are subject to this rule.
401
+ SupportedTypes:
402
+ - block
403
+ - case
404
+ - class
405
+ - if
406
+ - kwbegin
407
+ - module
408
+ EnforcedStyle: new_line
409
+ SupportedStyles:
410
+ # Ensures that the assignment operator and the rhs are on the same line for
411
+ # the set of supported types.
412
+ - same_line
413
+ # Ensures that the assignment operator and the rhs are on separate lines
414
+ # for the set of supported types.
415
+ - new_line
416
+
417
+ Layout/MultilineHashBraceLayout:
418
+ EnforcedStyle: symmetrical
419
+ SupportedStyles:
420
+ # symmetrical: closing brace is positioned in same way as opening brace
421
+ # new_line: closing brace is always on a new line
422
+ # same_line: closing brace is always on same line as last element
423
+ - symmetrical
424
+ - new_line
425
+ - same_line
426
+
427
+ Layout/MultilineMethodCallBraceLayout:
428
+ EnforcedStyle: symmetrical
429
+ SupportedStyles:
430
+ # symmetrical: closing brace is positioned in same way as opening brace
431
+ # new_line: closing brace is always on a new line
432
+ # same_line: closing brace is always on the same line as last argument
433
+ - symmetrical
434
+ - new_line
435
+ - same_line
436
+
437
+ Layout/MultilineMethodCallIndentation:
438
+ EnforcedStyle: aligned
439
+ SupportedStyles:
440
+ - aligned
441
+ - indented
442
+ - indented_relative_to_receiver
443
+ # By default, the indentation width from Layout/IndentationWidth is used
444
+ # But it can be overridden by setting this parameter
445
+ IndentationWidth: ~
446
+
447
+ Layout/MultilineMethodDefinitionBraceLayout:
448
+ EnforcedStyle: symmetrical
449
+ SupportedStyles:
450
+ # symmetrical: closing brace is positioned in same way as opening brace
451
+ # new_line: closing brace is always on a new line
452
+ # same_line: closing brace is always on the same line as last parameter
453
+ - symmetrical
454
+ - new_line
455
+ - same_line
456
+
457
+ Layout/MultilineOperationIndentation:
458
+ EnforcedStyle: aligned
459
+ SupportedStyles:
460
+ - aligned
461
+ - indented
462
+ # By default, the indentation width from `Layout/IndentationWidth` is used
463
+ # But it can be overridden by setting this parameter
464
+ IndentationWidth: ~
465
+
466
+ Layout/SpaceAroundBlockParameters:
467
+ EnforcedStyleInsidePipes: no_space
468
+ SupportedStylesInsidePipes:
469
+ - space
470
+ - no_space
471
+
472
+ Layout/SpaceAroundEqualsInParameterDefault:
473
+ EnforcedStyle: space
474
+ SupportedStyles:
475
+ - space
476
+ - no_space
477
+
478
+ Layout/SpaceAroundOperators:
479
+ # When `true`, allows most uses of extra spacing if the intent is to align
480
+ # with an operator on the previous or next line, not counting empty lines
481
+ # or comment lines.
482
+ AllowForAlignment: true
483
+
484
+ Layout/SpaceBeforeBlockBraces:
485
+ EnforcedStyle: space
486
+ SupportedStyles:
487
+ - space
488
+ - no_space
489
+ SupportedStylesForEmptyBraces:
490
+ - space
491
+ - no_space
492
+
493
+ Layout/SpaceBeforeFirstArg:
494
+ # When `true`, allows most uses of extra spacing if the intent is to align
495
+ # things with the previous or next line, not counting empty lines or comment
496
+ # lines.
497
+ AllowForAlignment: true
498
+
499
+ Layout/SpaceInsideBlockBraces:
500
+ EnforcedStyle: space
501
+ SupportedStyles:
502
+ - space
503
+ - no_space
504
+ EnforcedStyleForEmptyBraces: no_space
505
+ SupportedStylesForEmptyBraces:
506
+ - space
507
+ - no_space
508
+ # Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
509
+ SpaceBeforeBlockParameters: true
510
+
511
+ Layout/SpaceInsideHashLiteralBraces:
512
+ EnforcedStyle: space
513
+ SupportedStyles:
514
+ - space
515
+ - no_space
516
+ # 'compact' normally requires a space inside hash braces, with the exception
517
+ # that successive left braces or right braces are collapsed together
518
+ - compact
519
+ EnforcedStyleForEmptyBraces: no_space
520
+ SupportedStylesForEmptyBraces:
521
+ - space
522
+ - no_space
523
+
524
+ Layout/SpaceInsideStringInterpolation:
525
+ EnforcedStyle: no_space
526
+ SupportedStyles:
527
+ - space
528
+ - no_space
529
+
530
+ Layout/Tab:
531
+ # By default, the indentation width from Layout/IndentationWidth is used
532
+ # But it can be overridden by setting this parameter
533
+ # It is used during auto-correction to determine how many spaces should
534
+ # replace each tab.
535
+ IndentationWidth: ~
536
+
537
+ Layout/TrailingBlankLines:
538
+ EnforcedStyle: final_newline
539
+ SupportedStyles:
540
+ - final_newline
541
+ - final_blank_line
542
+
543
+ #################### Naming ##########################
544
+
545
+ Naming/FileName:
546
+ # File names listed in `AllCops:Include` are excluded by default. Add extra
547
+ # excludes here.
548
+ Exclude: []
549
+ # When `true`, requires that each source file should define a class or module
550
+ # with a name which matches the file name (converted to ... case).
551
+ # It further expects it to be nested inside modules which match the names
552
+ # of subdirectories in its path.
553
+ ExpectMatchingDefinition: false
554
+ # If non-`nil`, expect all source file names to match the following regex.
555
+ # Only the file name itself is matched, not the entire file path.
556
+ # Use anchors as necessary if you want to match the entire name rather than
557
+ # just a part of it.
558
+ Regex: ~
559
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
560
+ # report offending filenames for executable scripts (i.e. source
561
+ # files with a shebang in the first line).
562
+ IgnoreExecutableScripts: true
563
+ AllowedAcronyms:
564
+ - CLI
565
+ - DSL
566
+ - ACL
567
+ - API
568
+ - ASCII
569
+ - CPU
570
+ - CSS
571
+ - DNS
572
+ - EOF
573
+ - GUID
574
+ - HTML
575
+ - HTTP
576
+ - HTTPS
577
+ - ID
578
+ - IP
579
+ - JSON
580
+ - LHS
581
+ - QPS
582
+ - RAM
583
+ - RHS
584
+ - RPC
585
+ - SLA
586
+ - SMTP
587
+ - SQL
588
+ - SSH
589
+ - TCP
590
+ - TLS
591
+ - TTL
592
+ - UDP
593
+ - UI
594
+ - UID
595
+ - UUID
596
+ - URI
597
+ - URL
598
+ - UTF8
599
+ - VM
600
+ - XML
601
+ - XMPP
602
+ - XSRF
603
+ - XSS
604
+
605
+ Naming/HeredocDelimiterNaming:
606
+ Blacklist:
607
+ - END
608
+ - !ruby/regexp '/EO[A-Z]{1}/'
609
+
610
+ Naming/HeredocDelimiterCase:
611
+ EnforcedStyle: uppercase
612
+ SupportedStyles:
613
+ - lowercase
614
+ - uppercase
615
+
616
+ Naming/MethodName:
617
+ EnforcedStyle: snake_case
618
+ SupportedStyles:
619
+ - snake_case
620
+ - camelCase
621
+
622
+ Naming/PredicateName:
623
+ # Predicate name prefixes.
624
+ NamePrefix:
625
+ - is_
626
+ - has_
627
+ - have_
628
+ # Predicate name prefixes that should be removed.
629
+ NamePrefixBlacklist:
630
+ - is_
631
+ - has_
632
+ - have_
633
+ # Predicate names which, despite having a blacklisted prefix, or no `?`,
634
+ # should still be accepted
635
+ NameWhitelist:
636
+ - is_a?
637
+ # Method definition macros for dynamically generated methods.
638
+ MethodDefinitionMacros:
639
+ - define_method
640
+ - define_singleton_method
641
+ # Exclude Rspec specs because there is a strong convention to write spec
642
+ # helpers in the form of `have_something` or `be_something`.
643
+ Exclude:
644
+ - 'spec/**/*'
645
+
646
+ Naming/VariableName:
647
+ EnforcedStyle: snake_case
648
+ SupportedStyles:
649
+ - snake_case
650
+ - camelCase
651
+
652
+ Naming/VariableNumber:
653
+ EnforcedStyle: normalcase
654
+ SupportedStyles:
655
+ - snake_case
656
+ - normalcase
657
+ - non_integer
658
+
659
+ #################### Style ###########################
660
+
661
+ Style/Alias:
662
+ EnforcedStyle: prefer_alias
663
+ SupportedStyles:
664
+ - prefer_alias
665
+ - prefer_alias_method
666
+
667
+ Style/AndOr:
668
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
669
+ # or completely (always).
670
+ EnforcedStyle: always
671
+ SupportedStyles:
672
+ - always
673
+ - conditionals
674
+
675
+ # Checks if usage of `%()` or `%Q()` matches configuration.
676
+ Style/BarePercentLiterals:
677
+ EnforcedStyle: bare_percent
678
+ SupportedStyles:
679
+ - percent_q
680
+ - bare_percent
681
+
682
+ Style/BlockDelimiters:
683
+ EnforcedStyle: line_count_based
684
+ SupportedStyles:
685
+ # The `line_count_based` style enforces braces around single line blocks and
686
+ # do..end around multi-line blocks.
687
+ - line_count_based
688
+ # The `semantic` style enforces braces around functional blocks, where the
689
+ # primary purpose of the block is to return a value and do..end for
690
+ # procedural blocks, where the primary purpose of the block is its
691
+ # side-effects.
692
+ #
693
+ # This looks at the usage of a block's method to determine its type (e.g. is
694
+ # the result of a `map` assigned to a variable or passed to another
695
+ # method) but exceptions are permitted in the `ProceduralMethods`,
696
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
697
+ - semantic
698
+ # The `braces_for_chaining` style enforces braces around single line blocks
699
+ # and do..end around multi-line blocks, except for multi-line blocks whose
700
+ # return value is being chained with another method (in which case braces
701
+ # are enforced).
702
+ - braces_for_chaining
703
+ ProceduralMethods:
704
+ # Methods that are known to be procedural in nature but look functional from
705
+ # their usage, e.g.
706
+ #
707
+ # time = Benchmark.realtime do
708
+ # foo.bar
709
+ # end
710
+ #
711
+ # Here, the return value of the block is discarded but the return value of
712
+ # `Benchmark.realtime` is used.
713
+ - benchmark
714
+ - bm
715
+ - bmbm
716
+ - create
717
+ - each_with_object
718
+ - measure
719
+ - new
720
+ - realtime
721
+ - tap
722
+ - with_object
723
+ FunctionalMethods:
724
+ # Methods that are known to be functional in nature but look procedural from
725
+ # their usage, e.g.
726
+ #
727
+ # let(:foo) { Foo.new }
728
+ #
729
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
730
+ # doesn't appear to be used from the return value of `let`.
731
+ - let
732
+ - let!
733
+ - subject
734
+ - watch
735
+ IgnoredMethods:
736
+ # Methods that can be either procedural or functional and cannot be
737
+ # categorised from their usage alone, e.g.
738
+ #
739
+ # foo = lambda do |x|
740
+ # puts "Hello, #{x}"
741
+ # end
742
+ #
743
+ # foo = lambda do |x|
744
+ # x * 100
745
+ # end
746
+ #
747
+ # Here, it is impossible to tell from the return value of `lambda` whether
748
+ # the inner block's return value is significant.
749
+ - lambda
750
+ - proc
751
+ - it
752
+
753
+ Style/BracesAroundHashParameters:
754
+ EnforcedStyle: no_braces
755
+ SupportedStyles:
756
+ # The `braces` style enforces braces around all method parameters that are
757
+ # hashes.
758
+ - braces
759
+ # The `no_braces` style checks that the last parameter doesn't have braces
760
+ # around it.
761
+ - no_braces
762
+ # The `context_dependent` style checks that the last parameter doesn't have
763
+ # braces around it, but requires braces if the second to last parameter is
764
+ # also a hash literal.
765
+ - context_dependent
766
+
767
+ Style/ClassAndModuleChildren:
768
+ # Checks the style of children definitions at classes and modules.
769
+ #
770
+ # Basically there are two different styles:
771
+ #
772
+ # `nested` - have each child on a separate line
773
+ # class Foo
774
+ # class Bar
775
+ # end
776
+ # end
777
+ #
778
+ # `compact` - combine definitions as much as possible
779
+ # class Foo::Bar
780
+ # end
781
+ #
782
+ # The compact style is only forced, for classes or modules with one child.
783
+ EnforcedStyle: nested
784
+ SupportedStyles:
785
+ - nested
786
+ - compact
787
+
788
+ Style/ClassCheck:
789
+ EnforcedStyle: is_a?
790
+ SupportedStyles:
791
+ - is_a?
792
+ - kind_of?
793
+
794
+ # Align with the style guide.
795
+ Style/CollectionMethods:
796
+ # Mapping from undesired method to desired_method
797
+ # e.g. to use `detect` over `find`:
798
+ #
799
+ # CollectionMethods:
800
+ # PreferredMethods:
801
+ # find: detect
802
+ PreferredMethods:
803
+ collect: 'map'
804
+ collect!: 'map!'
805
+ inject: 'reduce'
806
+ detect: 'find'
807
+ find_all: 'select'
808
+
809
+ # Use '`' or '%x' around command literals.
810
+ Style/CommandLiteral:
811
+ EnforcedStyle: backticks
812
+ # backticks: Always use backticks.
813
+ # percent_x: Always use `%x`.
814
+ # mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
815
+ SupportedStyles:
816
+ - backticks
817
+ - percent_x
818
+ - mixed
819
+ # If `false`, the cop will always recommend using `%x` if one or more backticks
820
+ # are found in the command string.
821
+ AllowInnerBackticks: false
822
+
823
+ # Checks formatting of special comments
824
+ Style/CommentAnnotation:
825
+ Keywords:
826
+ - TODO
827
+ - FIXME
828
+ - OPTIMIZE
829
+ - HACK
830
+ - REVIEW
831
+
832
+ Style/ConditionalAssignment:
833
+ EnforcedStyle: assign_to_condition
834
+ SupportedStyles:
835
+ - assign_to_condition
836
+ - assign_inside_condition
837
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
838
+ # will only register an offense when all branches of a condition are
839
+ # a single line.
840
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
841
+ # will only register an offense for assignment to a condition that has
842
+ # at least one multiline branch.
843
+ SingleLineConditionsOnly: true
844
+ IncludeTernaryExpressions: true
845
+
846
+ # Checks that you have put a copyright in a comment before any code.
847
+ #
848
+ # You can override the default Notice in your .rubocop.yml file.
849
+ #
850
+ # In order to use autocorrect, you must supply a value for the
851
+ # `AutocorrectNotice` key that matches the regexp Notice. A blank
852
+ # `AutocorrectNotice` will cause an error during autocorrect.
853
+ #
854
+ # Autocorrect will add a copyright notice in a comment at the top
855
+ # of the file immediately after any shebang or encoding comments.
856
+ #
857
+ # Example rubocop.yml:
858
+ #
859
+ # Style/Copyright:
860
+ # Enabled: true
861
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
862
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
863
+ #
864
+ Style/Copyright:
865
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
866
+ AutocorrectNotice: ''
867
+
868
+ Style/DocumentationMethod:
869
+ RequireForNonPublicMethods: false
870
+
871
+ # Warn on empty else statements
872
+ # empty - warn only on empty `else`
873
+ # nil - warn on `else` with nil in it
874
+ # both - warn on empty `else` and `else` with `nil` in it
875
+ Style/EmptyElse:
876
+ EnforcedStyle: both
877
+ SupportedStyles:
878
+ - empty
879
+ - nil
880
+ - both
881
+
882
+ Style/EmptyMethod:
883
+ EnforcedStyle: compact
884
+ SupportedStyles:
885
+ - compact
886
+ - expanded
887
+
888
+ # Checks use of for or each in multiline loops.
889
+ Style/For:
890
+ EnforcedStyle: each
891
+ SupportedStyles:
892
+ - for
893
+ - each
894
+
895
+ # Enforce the method used for string formatting.
896
+ Style/FormatString:
897
+ EnforcedStyle: format
898
+ SupportedStyles:
899
+ - format
900
+ - sprintf
901
+ - percent
902
+
903
+ # Enforce using either `%<token>s` or `%{token}`
904
+ Style/FormatStringToken:
905
+ EnforcedStyle: annotated
906
+ SupportedStyles:
907
+ # Prefer tokens which contain a sprintf like type annotation like
908
+ # `%<name>s`, `%<age>d`, `%<score>f`
909
+ - annotated
910
+ # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
911
+ - template
912
+
913
+ Style/FrozenStringLiteralComment:
914
+ EnforcedStyle: when_needed
915
+ SupportedStyles:
916
+ # `when_needed` will add the frozen string literal comment to files
917
+ # only when the `TargetRubyVersion` is set to 2.3+.
918
+ - when_needed
919
+ # `always` will always add the frozen string literal comment to a file
920
+ # regardless of the Ruby version or if `freeze` or `<<` are called on a
921
+ # string literal. If you run code against multiple versions of Ruby, it is
922
+ # possible that this will create errors in Ruby 2.3.0+.
923
+ - always
924
+ # `never` will enforce that the frozen string literal comment does not
925
+ # exist in a file.
926
+ - never
927
+
928
+ # Built-in global variables are allowed by default.
929
+ Style/GlobalVars:
930
+ AllowedVariables: []
931
+
932
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
933
+ # needs to have to trigger this cop
934
+ Style/GuardClause:
935
+ MinBodyLength: 1
936
+
937
+ Style/HashSyntax:
938
+ EnforcedStyle: ruby19
939
+ SupportedStyles:
940
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
941
+ - ruby19
942
+ # checks for hash rocket syntax for all hashes
943
+ - hash_rockets
944
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
945
+ - no_mixed_keys
946
+ # enforces both ruby19 and no_mixed_keys styles
947
+ - ruby19_no_mixed_keys
948
+ # Force hashes that have a symbol value to use hash rockets
949
+ UseHashRocketsWithSymbolValues: false
950
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
951
+ PreferHashRocketsForNonAlnumEndingSymbols: false
952
+
953
+ Style/InverseMethods:
954
+ Enabled: true
955
+ # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
956
+ # The relationship of inverse methods only needs to be defined in one direction.
957
+ # Keys and values both need to be defined as symbols.
958
+ InverseMethods:
959
+ :any?: :none?
960
+ :even?: :odd?
961
+ :==: :!=
962
+ :=~: :!~
963
+ :<: :>=
964
+ :>: :<=
965
+ # `ActiveSupport` defines some common inverse methods. They are listed below,
966
+ # and not enabled by default.
967
+ #:present?: :blank?,
968
+ #:include?: :exclude?
969
+ # `InverseBlocks` are methods that are inverted by inverting the return
970
+ # of the block that is passed to the method
971
+ InverseBlocks:
972
+ :select: :reject
973
+ :select!: :reject!
974
+
975
+ Style/Lambda:
976
+ EnforcedStyle: line_count_dependent
977
+ SupportedStyles:
978
+ - line_count_dependent
979
+ - lambda
980
+ - literal
981
+
982
+ Style/LambdaCall:
983
+ EnforcedStyle: call
984
+ SupportedStyles:
985
+ - call
986
+ - braces
987
+
988
+ Style/MethodCallWithArgsParentheses:
989
+ IgnoreMacros: true
990
+ IgnoredMethods: []
991
+
992
+ Style/MethodDefParentheses:
993
+ EnforcedStyle: require_parentheses
994
+ SupportedStyles:
995
+ - require_parentheses
996
+ - require_no_parentheses
997
+ - require_no_parentheses_except_multiline
998
+
999
+ # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1000
+ # `module` bodies.
1001
+ Style/MixinGrouping:
1002
+ EnforcedStyle: separated
1003
+ SupportedStyles:
1004
+ # separated: each mixed in module goes in a separate statement.
1005
+ # grouped: mixed in modules are grouped into a single statement.
1006
+ - separated
1007
+ - grouped
1008
+
1009
+ Style/ModuleFunction:
1010
+ EnforcedStyle: module_function
1011
+ SupportedStyles:
1012
+ - module_function
1013
+ - extend_self
1014
+
1015
+ Style/MultilineMemoization:
1016
+ EnforcedStyle: keyword
1017
+ SupportedStyles:
1018
+ - keyword
1019
+ - braces
1020
+
1021
+ Style/NegatedIf:
1022
+ EnforcedStyle: both
1023
+ SupportedStyles:
1024
+ # both: prefix and postfix negated `if` should both use `unless`
1025
+ # prefix: only use `unless` for negated `if` statements positioned before the body of the statement
1026
+ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement
1027
+ - both
1028
+ - prefix
1029
+ - postfix
1030
+
1031
+ Style/NestedParenthesizedCalls:
1032
+ Whitelist:
1033
+ - be
1034
+ - be_a
1035
+ - be_an
1036
+ - be_between
1037
+ - be_falsey
1038
+ - be_kind_of
1039
+ - be_instance_of
1040
+ - be_truthy
1041
+ - be_within
1042
+ - eq
1043
+ - eql
1044
+ - end_with
1045
+ - include
1046
+ - match
1047
+ - raise_error
1048
+ - respond_to
1049
+ - start_with
1050
+
1051
+ Style/Next:
1052
+ # With `always` all conditions at the end of an iteration needs to be
1053
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
1054
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
1055
+ EnforcedStyle: skip_modifier_ifs
1056
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
1057
+ # needs to have to trigger this cop
1058
+ MinBodyLength: 3
1059
+ SupportedStyles:
1060
+ - skip_modifier_ifs
1061
+ - always
1062
+
1063
+ Style/NonNilCheck:
1064
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
1065
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
1066
+ # **usually** OK, but might change behavior.
1067
+ #
1068
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
1069
+ # offenses for `!x.nil?` and does no changes that might change behavior.
1070
+ IncludeSemanticChanges: false
1071
+
1072
+ Style/NumericLiterals:
1073
+ MinDigits: 5
1074
+ Strict: false
1075
+
1076
+ Style/NumericLiteralPrefix:
1077
+ EnforcedOctalStyle: zero_with_o
1078
+ SupportedOctalStyles:
1079
+ - zero_with_o
1080
+ - zero_only
1081
+
1082
+ Style/NumericPredicate:
1083
+ EnforcedStyle: predicate
1084
+ SupportedStyles:
1085
+ - predicate
1086
+ - comparison
1087
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
1088
+ # false positives.
1089
+ Exclude:
1090
+ - 'spec/**/*'
1091
+
1092
+ Style/OptionHash:
1093
+ # A list of parameter names that will be flagged by this cop.
1094
+ SuspiciousParamNames:
1095
+ - options
1096
+ - opts
1097
+ - args
1098
+ - params
1099
+ - parameters
1100
+
1101
+ # Allow safe assignment in conditions.
1102
+ Style/ParenthesesAroundCondition:
1103
+ AllowSafeAssignment: true
1104
+
1105
+ Style/PercentLiteralDelimiters:
1106
+ # Specify the default preferred delimiter for all types with the 'default' key
1107
+ # Override individual delimiters (even with default specified) by specifying
1108
+ # an individual key
1109
+ PreferredDelimiters:
1110
+ default: ()
1111
+ '%i': '[]'
1112
+ '%I': '[]'
1113
+ '%r': '{}'
1114
+ '%w': '[]'
1115
+ '%W': '[]'
1116
+
1117
+ Style/PercentQLiterals:
1118
+ EnforcedStyle: lower_case_q
1119
+ SupportedStyles:
1120
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
1121
+ - upper_case_q # Always use `%Q`
1122
+
1123
+ Style/PreferredHashMethods:
1124
+ EnforcedStyle: short
1125
+ SupportedStyles:
1126
+ - short
1127
+ - verbose
1128
+
1129
+ Style/RaiseArgs:
1130
+ EnforcedStyle: exploded
1131
+ SupportedStyles:
1132
+ - compact # raise Exception.new(msg)
1133
+ - exploded # raise Exception, msg
1134
+
1135
+ Style/RedundantReturn:
1136
+ # When `true` allows code like `return x, y`.
1137
+ AllowMultipleReturnValues: false
1138
+
1139
+ # Use `/` or `%r` around regular expressions.
1140
+ Style/RegexpLiteral:
1141
+ EnforcedStyle: slashes
1142
+ # slashes: Always use slashes.
1143
+ # percent_r: Always use `%r`.
1144
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
1145
+ SupportedStyles:
1146
+ - slashes
1147
+ - percent_r
1148
+ - mixed
1149
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
1150
+ # are found in the regexp string.
1151
+ AllowInnerSlashes: false
1152
+
1153
+ Style/ReturnNil:
1154
+ EnforcedStyle: return
1155
+ SupportedStyles:
1156
+ - return
1157
+ - return_nil
1158
+
1159
+ Style/SafeNavigation:
1160
+ # Safe navigation may cause a statement to start returning `nil` in addition
1161
+ # to whatever it used to return.
1162
+ ConvertCodeThatCanStartToReturnNil: false
1163
+
1164
+ Style/Semicolon:
1165
+ # Allow `;` to separate several expressions on the same line.
1166
+ AllowAsExpressionSeparator: false
1167
+
1168
+ Style/SignalException:
1169
+ EnforcedStyle: only_raise
1170
+ SupportedStyles:
1171
+ - only_raise
1172
+ - only_fail
1173
+ - semantic
1174
+
1175
+ Style/SingleLineBlockParams:
1176
+ Methods:
1177
+ - reduce:
1178
+ - acc
1179
+ - elem
1180
+ - inject:
1181
+ - acc
1182
+ - elem
1183
+
1184
+ Style/SingleLineMethods:
1185
+ AllowIfMethodIsEmpty: true
1186
+
1187
+ Style/SpecialGlobalVars:
1188
+ EnforcedStyle: use_english_names
1189
+ SupportedStyles:
1190
+ - use_perl_names
1191
+ - use_english_names
1192
+
1193
+ Style/StabbyLambdaParentheses:
1194
+ EnforcedStyle: require_parentheses
1195
+ SupportedStyles:
1196
+ - require_parentheses
1197
+ - require_no_parentheses
1198
+
1199
+ Style/StringLiterals:
1200
+ EnforcedStyle: single_quotes
1201
+ SupportedStyles:
1202
+ - single_quotes
1203
+ - double_quotes
1204
+ # If `true`, strings which span multiple lines using `\` for continuation must
1205
+ # use the same type of quotes on each line.
1206
+ ConsistentQuotesInMultiline: false
1207
+
1208
+ Style/StringLiteralsInInterpolation:
1209
+ EnforcedStyle: single_quotes
1210
+ SupportedStyles:
1211
+ - single_quotes
1212
+ - double_quotes
1213
+
1214
+ Style/StringMethods:
1215
+ # Mapping from undesired method to desired_method
1216
+ # e.g. to use `to_sym` over `intern`:
1217
+ #
1218
+ # StringMethods:
1219
+ # PreferredMethods:
1220
+ # intern: to_sym
1221
+ PreferredMethods:
1222
+ intern: to_sym
1223
+
1224
+ Style/SymbolArray:
1225
+ EnforcedStyle: percent
1226
+ MinSize: 0
1227
+ SupportedStyles:
1228
+ - percent
1229
+ - brackets
1230
+
1231
+ Style/SymbolProc:
1232
+ # A list of method names to be ignored by the check.
1233
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
1234
+ IgnoredMethods:
1235
+ - respond_to
1236
+ - define_method
1237
+
1238
+ Style/TernaryParentheses:
1239
+ EnforcedStyle: require_no_parentheses
1240
+ SupportedStyles:
1241
+ - require_parentheses
1242
+ - require_no_parentheses
1243
+ - require_parentheses_when_complex
1244
+ AllowSafeAssignment: true
1245
+
1246
+ Style/TrailingCommaInArguments:
1247
+ # If `comma`, the cop requires a comma after the last argument, but only for
1248
+ # parenthesized method calls where each argument is on its own line.
1249
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1250
+ # for all parenthesized method calls with arguments.
1251
+ EnforcedStyleForMultiline: no_comma
1252
+ SupportedStylesForMultiline:
1253
+ - comma
1254
+ - consistent_comma
1255
+ - no_comma
1256
+
1257
+ Style/TrailingCommaInLiteral:
1258
+ # If `comma`, the cop requires a comma after the last item in an array or
1259
+ # hash, but only when each item is on its own line.
1260
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1261
+ # non-empty array and hash literals.
1262
+ EnforcedStyleForMultiline: no_comma
1263
+ SupportedStylesForMultiline:
1264
+ - comma
1265
+ - consistent_comma
1266
+ - no_comma
1267
+
1268
+ # `TrivialAccessors` requires exact name matches and doesn't allow
1269
+ # predicated methods by default.
1270
+ Style/TrivialAccessors:
1271
+ # When set to `false` the cop will suggest the use of accessor methods
1272
+ # in situations like:
1273
+ #
1274
+ # def name
1275
+ # @other_name
1276
+ # end
1277
+ #
1278
+ # This way you can uncover "hidden" attributes in your code.
1279
+ ExactNameMatch: true
1280
+ AllowPredicates: true
1281
+ # Allows trivial writers that don't end in an equal sign. e.g.
1282
+ #
1283
+ # def on_exception(action)
1284
+ # @on_exception=action
1285
+ # end
1286
+ # on_exception :restart
1287
+ #
1288
+ # Commonly used in DSLs
1289
+ AllowDSLWriters: false
1290
+ IgnoreClassMethods: false
1291
+ Whitelist:
1292
+ - to_ary
1293
+ - to_a
1294
+ - to_c
1295
+ - to_enum
1296
+ - to_h
1297
+ - to_hash
1298
+ - to_i
1299
+ - to_int
1300
+ - to_io
1301
+ - to_open
1302
+ - to_path
1303
+ - to_proc
1304
+ - to_r
1305
+ - to_regexp
1306
+ - to_str
1307
+ - to_s
1308
+ - to_sym
1309
+
1310
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1311
+ Style/WordArray:
1312
+ EnforcedStyle: percent
1313
+ SupportedStyles:
1314
+ # percent style: %w(word1 word2)
1315
+ - percent
1316
+ # bracket style: ['word1', 'word2']
1317
+ - brackets
1318
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1319
+ # smaller than a certain size. The rule is only applied to arrays
1320
+ # whose element count is greater than or equal to `MinSize`.
1321
+ MinSize: 0
1322
+ # The regular expression `WordRegex` decides what is considered a word.
1323
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1324
+
1325
+ Style/YodaCondition:
1326
+ EnforcedStyle: all_comparison_operators
1327
+ SupportedStyles:
1328
+ # check all comparison operators
1329
+ - all_comparison_operators
1330
+ # check only equality operators: `!=` and `==`
1331
+ - equality_operators_only
1332
+
1333
+ #################### Metrics ###############################
1334
+
1335
+ Metrics/AbcSize:
1336
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1337
+ # a Float.
1338
+ Max: 15
1339
+
1340
+ Metrics/BlockLength:
1341
+ CountComments: false # count full line comments?
1342
+ Max: 25
1343
+ ExcludedMethods: []
1344
+
1345
+ Metrics/BlockNesting:
1346
+ CountBlocks: false
1347
+ Max: 3
1348
+
1349
+ Metrics/ClassLength:
1350
+ CountComments: false # count full line comments?
1351
+ Max: 100
1352
+
1353
+ # Avoid complex methods.
1354
+ Metrics/CyclomaticComplexity:
1355
+ Max: 6
1356
+
1357
+ Metrics/LineLength:
1358
+ Max: 80
1359
+ # To make it possible to copy or click on URIs in the code, we allow lines
1360
+ # containing a URI to be longer than Max.
1361
+ AllowHeredoc: true
1362
+ AllowURI: true
1363
+ URISchemes:
1364
+ - http
1365
+ - https
1366
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1367
+ # directives like '# rubocop: enable ...' when calculating a line's length.
1368
+ IgnoreCopDirectives: false
1369
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1370
+ # elements. Strings will be converted to Regexp objects. A line that matches
1371
+ # any regular expression listed in this option will be ignored by LineLength.
1372
+ IgnoredPatterns: []
1373
+
1374
+ Metrics/MethodLength:
1375
+ CountComments: false # count full line comments?
1376
+ Max: 10
1377
+
1378
+ Metrics/ModuleLength:
1379
+ CountComments: false # count full line comments?
1380
+ Max: 100
1381
+
1382
+ Metrics/ParameterLists:
1383
+ Max: 5
1384
+ CountKeywordArgs: true
1385
+
1386
+ Metrics/PerceivedComplexity:
1387
+ Max: 7
1388
+
1389
+ #################### Lint ##################################
1390
+
1391
+ # Allow safe assignment in conditions.
1392
+ Lint/AssignmentInCondition:
1393
+ AllowSafeAssignment: true
1394
+
1395
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1396
+ Lint/BlockAlignment:
1397
+ # The value `start_of_block` means that the `end` should be aligned with line
1398
+ # where the `do` keyword appears.
1399
+ # The value `start_of_line` means it should be aligned with the whole
1400
+ # expression's starting line.
1401
+ # The value `either` means both are allowed.
1402
+ EnforcedStyleAlignWith: either
1403
+ SupportedStylesAlignWith:
1404
+ - either
1405
+ - start_of_block
1406
+ - start_of_line
1407
+
1408
+ Lint/DefEndAlignment:
1409
+ # The value `def` means that `end` should be aligned with the def keyword.
1410
+ # The value `start_of_line` means that `end` should be aligned with method
1411
+ # calls like `private`, `public`, etc, if present in front of the `def`
1412
+ # keyword on the same line.
1413
+ EnforcedStyleAlignWith: start_of_line
1414
+ SupportedStylesAlignWith:
1415
+ - start_of_line
1416
+ - def
1417
+ AutoCorrect: false
1418
+
1419
+ # Align ends correctly.
1420
+ Lint/EndAlignment:
1421
+ # The value `keyword` means that `end` should be aligned with the matching
1422
+ # keyword (`if`, `while`, etc.).
1423
+ # The value `variable` means that in assignments, `end` should be aligned
1424
+ # with the start of the variable on the left hand side of `=`. In all other
1425
+ # situations, `end` should still be aligned with the keyword.
1426
+ # The value `start_of_line` means that `end` should be aligned with the start
1427
+ # of the line which the matching keyword appears on.
1428
+ EnforcedStyleAlignWith: keyword
1429
+ SupportedStylesAlignWith:
1430
+ - keyword
1431
+ - variable
1432
+ - start_of_line
1433
+ AutoCorrect: false
1434
+
1435
+ Lint/InheritException:
1436
+ # The default base class in favour of `Exception`.
1437
+ EnforcedStyle: runtime_error
1438
+ SupportedStyles:
1439
+ - runtime_error
1440
+ - standard_error
1441
+
1442
+ Lint/SafeNavigationChain:
1443
+ Whitelist:
1444
+ - present?
1445
+ - blank?
1446
+ - presence
1447
+ - try
1448
+
1449
+ # Checks for unused block arguments
1450
+ Lint/UnusedBlockArgument:
1451
+ IgnoreEmptyBlocks: true
1452
+ AllowUnusedKeywordArguments: false
1453
+
1454
+ # Checks for unused method arguments.
1455
+ Lint/UnusedMethodArgument:
1456
+ AllowUnusedKeywordArguments: false
1457
+ IgnoreEmptyMethods: true
1458
+
1459
+ #################### Performance ###########################
1460
+
1461
+ Performance/DoubleStartEndWith:
1462
+ # Used to check for `starts_with?` and `ends_with?`.
1463
+ # These methods are defined by `ActiveSupport`.
1464
+ IncludeActiveSupportAliases: false
1465
+
1466
+ Performance/RedundantMerge:
1467
+ # Max number of key-value pairs to consider an offense
1468
+ MaxKeyValuePairs: 2
1469
+
1470
+ #################### Rails #################################
1471
+
1472
+ Rails/ActionFilter:
1473
+ EnforcedStyle: action
1474
+ SupportedStyles:
1475
+ - action
1476
+ - filter
1477
+ Include:
1478
+ - app/controllers/**/*.rb
1479
+
1480
+ Rails/Date:
1481
+ # The value `strict` disallows usage of `Date.today`, `Date.current`,
1482
+ # `Date#to_time` etc.
1483
+ # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
1484
+ # (but not `Date.today`) which are overridden by ActiveSupport to handle current
1485
+ # time zone.
1486
+ EnforcedStyle: flexible
1487
+ SupportedStyles:
1488
+ - strict
1489
+ - flexible
1490
+
1491
+ Rails/Delegate:
1492
+ # When set to true, using the target object as a prefix of the
1493
+ # method name without using the `delegate` method will be a
1494
+ # violation. When set to false, this case is legal.
1495
+ EnforceForPrefixed: true
1496
+
1497
+ Rails/DynamicFindBy:
1498
+ Whitelist:
1499
+ - find_by_sql
1500
+
1501
+ Rails/EnumUniqueness:
1502
+ Include:
1503
+ - app/models/**/*.rb
1504
+
1505
+ Rails/Exit:
1506
+ Include:
1507
+ - app/**/*.rb
1508
+ - config/**/*.rb
1509
+ - lib/**/*.rb
1510
+ Exclude:
1511
+ - lib/**/*.rake
1512
+
1513
+ Rails/FindBy:
1514
+ Include:
1515
+ - app/models/**/*.rb
1516
+
1517
+ Rails/FindEach:
1518
+ Include:
1519
+ - app/models/**/*.rb
1520
+
1521
+ Rails/HasAndBelongsToMany:
1522
+ Include:
1523
+ - app/models/**/*.rb
1524
+
1525
+ Rails/HasManyOrHasOneDependent:
1526
+ Include:
1527
+ - app/models/**/*.rb
1528
+
1529
+ Rails/NotNullColumn:
1530
+ Include:
1531
+ - db/migrate/*.rb
1532
+
1533
+ Rails/Output:
1534
+ Include:
1535
+ - app/**/*.rb
1536
+ - config/**/*.rb
1537
+ - db/**/*.rb
1538
+ - lib/**/*.rb
1539
+
1540
+ Rails/ReadWriteAttribute:
1541
+ Include:
1542
+ - app/models/**/*.rb
1543
+
1544
+ Rails/RequestReferer:
1545
+ EnforcedStyle: referer
1546
+ SupportedStyles:
1547
+ - referer
1548
+ - referrer
1549
+
1550
+ Rails/ReversibleMigration:
1551
+ Include:
1552
+ - db/migrate/*.rb
1553
+
1554
+ Rails/SafeNavigation:
1555
+ # This will convert usages of `try` to use safe navigation as well as `try!`.
1556
+ # `try` and `try!` work slighly differently. `try!` and safe navigation will
1557
+ # both raise a `NoMethodError` if the receiver of the method call does not
1558
+ # implement the intended method. `try` will not raise an exception for this.
1559
+ ConvertTry: false
1560
+
1561
+ Rails/ScopeArgs:
1562
+ Include:
1563
+ - app/models/**/*.rb
1564
+
1565
+ Rails/TimeZone:
1566
+ # The value `strict` means that `Time` should be used with `zone`.
1567
+ # The value `flexible` allows usage of `in_time_zone` instead of `zone`.
1568
+ EnforcedStyle: flexible
1569
+ SupportedStyles:
1570
+ - strict
1571
+ - flexible
1572
+
1573
+ Rails/UniqBeforePluck:
1574
+ EnforcedStyle: conservative
1575
+ SupportedStyles:
1576
+ - conservative
1577
+ - aggressive
1578
+ AutoCorrect: false
1579
+
1580
+ Rails/UnknownEnv:
1581
+ Environments:
1582
+ - development
1583
+ - test
1584
+ - production
1585
+
1586
+ Rails/SkipsModelValidations:
1587
+ Blacklist:
1588
+ - decrement!
1589
+ - decrement_counter
1590
+ - increment!
1591
+ - increment_counter
1592
+ - toggle!
1593
+ - touch
1594
+ - update_all
1595
+ - update_attribute
1596
+ - update_column
1597
+ - update_columns
1598
+ - update_counters
1599
+
1600
+ Rails/Validation:
1601
+ Include:
1602
+ - app/models/**/*.rb
1603
+
1604
+ Bundler/OrderedGems:
1605
+ TreatCommentsAsGroupSeparators: true
1606
+
1607
+ Gemspec/OrderedDependencies:
1608
+ TreatCommentsAsGroupSeparators: true