street_sweeper 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6b46885639c8d59c02eaa8d9532846148f982674d03dc07f0dc63e55068d87ae
4
+ data.tar.gz: 115fb715b911a6b521d1a03d50c4ed46c0eca6a83ea601b153474d7fb2ad8770
5
+ SHA512:
6
+ metadata.gz: 4d8b8bee1eb4adad27ad176acea6cbbf451716ce5571cd9c61b47adb9f4e1576e7fb6a33cc2c2548a9453d5a155eeb3c8858ec658e230d7d6e9a26d1d8859e29
7
+ data.tar.gz: 52fe809239c24932b19d4b308aa950d264010dff1c67eaa796ac6aa8626d0a3fe4488d3247aa732cc966e5ecf12e3e2e320f37df5a36cd7a1d77d3cb414f990d
@@ -0,0 +1,16 @@
1
+ .DS_Store
2
+ .swp
3
+ *.log
4
+ .ruby-version
5
+ .bundle
6
+ Gemfile.lock
7
+ .gem
8
+ *.bak
9
+ *~
10
+ *.old
11
+ *.tar.gz
12
+ tmp
13
+ coverage
14
+ doc
15
+ pkg
16
+ spec/reports
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,1472 @@
1
+ AllCops:
2
+ Include:
3
+ - '**/*.builder'
4
+ - '**/*.fcgi'
5
+ - '**/*.gemspec'
6
+ - '**/*.god'
7
+ - '**/*.jb'
8
+ - '**/*.jbuilder'
9
+ - '**/*.mspec'
10
+ - '**/*.opal'
11
+ - '**/*.pluginspec'
12
+ - '**/*.podspec'
13
+ - '**/*.rabl'
14
+ - '**/*.rake'
15
+ - '**/*.rbuild'
16
+ - '**/*.rbw'
17
+ - '**/*.rbx'
18
+ - '**/*.ru'
19
+ - '**/*.ruby'
20
+ - '**/*.spec'
21
+ - '**/*.thor'
22
+ - '**/*.watchr'
23
+ - '**/.irbrc'
24
+ - '**/.pryrc'
25
+ - '**/buildfile'
26
+ - '**/config.ru'
27
+ - '**/Appraisals'
28
+ - '**/Berksfile'
29
+ - '**/Brewfile'
30
+ - '**/Buildfile'
31
+ - '**/Capfile'
32
+ - '**/Cheffile'
33
+ - '**/Dangerfile'
34
+ - '**/Deliverfile'
35
+ - '**/Fastfile'
36
+ - '**/*Fastfile'
37
+ - '**/Guardfile'
38
+ - '**/Jarfile'
39
+ - '**/Mavenfile'
40
+ - '**/Podfile'
41
+ - '**/Puppetfile'
42
+ - '**/Rakefile'
43
+ - '**/Snapfile'
44
+ - '**/Thorfile'
45
+ - '**/Vagabondfile'
46
+ - '**/Vagrantfile'
47
+ Exclude:
48
+ - 'node_modules/**/*'
49
+ - 'bin/**/*'
50
+ - 'config/**/*'
51
+ - 'db/**/*'
52
+ - 'tmp/**/*'
53
+ - 'vendor/**/*'
54
+ # Default formatter will be used if no `-f/--format` option is given.
55
+ DefaultFormatter: progress
56
+ # Cop names are not displayed in offense messages by default. Change behavior
57
+ # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
58
+ # option.
59
+ DisplayCopNames: false
60
+ # Style guide URLs are not displayed in offense messages by default. Change
61
+ # behavior by overriding `DisplayStyleGuide`, or by giving the
62
+ # `-S/--display-style-guide` option.
63
+ DisplayStyleGuide: false
64
+ # When specifying style guide URLs, any paths and/or fragments will be
65
+ # evaluated relative to the base URL.
66
+ StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
67
+ # Extra details are not displayed in offense messages by default. Change
68
+ # behavior by overriding ExtraDetails, or by giving the
69
+ # `-E/--extra-details` option.
70
+ ExtraDetails: false
71
+ # Additional cops that do not reference a style guide rule may be enabled by
72
+ # default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
73
+ # the `--only-guide-cops` option.
74
+ StyleGuideCopsOnly: false
75
+ # All cops except the ones in disabled.yml are enabled by default. Change
76
+ # this behavior by overriding either `DisabledByDefault` or `EnabledByDefault`.
77
+ # When `DisabledByDefault` is `true`, all cops in the default configuration
78
+ # are disabled, and only cops in user configuration are enabled. This makes
79
+ # cops opt-in instead of opt-out. Note that when `DisabledByDefault` is `true`,
80
+ # cops in user configuration will be enabled even if they don't set the
81
+ # Enabled parameter.
82
+ # When `EnabledByDefault` is `true`, all cops, even those in disabled.yml,
83
+ # are enabled by default. Cops can still be disabled in user configuration.
84
+ # Note that it is invalid to set both EnabledByDefault and DisabledByDefault
85
+ # to true in the same configuration.
86
+ EnabledByDefault: false
87
+ DisabledByDefault: false
88
+ # Enables the result cache if `true`. Can be overridden by the `--cache` command
89
+ # line option.
90
+ UseCache: true
91
+ # Threshold for how many files can be stored in the result cache before some
92
+ # of the files are automatically removed.
93
+ MaxFilesInCache: 20000
94
+ # The cache will be stored in "rubocop_cache" under this directory. If
95
+ # CacheRootDirectory is ~ (nil), which it is by default, the root will be
96
+ # taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
97
+ # `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
98
+ CacheRootDirectory: ~
99
+ # It is possible for a malicious user to know the location of RuboCop's cache
100
+ # directory by looking at CacheRootDirectory, and create a symlink in its
101
+ # place that could cause RuboCop to overwrite unintended files, or read
102
+ # malicious input. If you are certain that your cache location is secure from
103
+ # this kind of attack, and wish to use a symlinked cache location, set this
104
+ # value to "true".
105
+ AllowSymlinksInCacheRootDirectory: false
106
+ # What MRI version of the Ruby interpreter is the inspected code intended to
107
+ # run on? (If there is more than one, set this to the lowest version.)
108
+ # If a value is specified for TargetRubyVersion then it is used.
109
+ # Else if .ruby-version exists and it contains an MRI version it is used.
110
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
111
+ TargetRubyVersion: ~
112
+
113
+ Documentation:
114
+ Enabled: false
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_fixed_indentation
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: trailing
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/TrailingBlankLines:
531
+ EnforcedStyle: final_newline
532
+ SupportedStyles:
533
+ - final_newline
534
+ - final_blank_line
535
+
536
+ #################### Naming ##########################
537
+
538
+ Naming/FileName:
539
+ Enabled: false
540
+ # File names listed in `AllCops:Include` are excluded by default. Add extra
541
+ # excludes here.
542
+ Exclude: []
543
+ # When `true`, requires that each source file should define a class or module
544
+ # with a name which matches the file name (converted to ... case).
545
+ # It further expects it to be nested inside modules which match the names
546
+ # of subdirectories in its path.
547
+ ExpectMatchingDefinition: false
548
+ # If non-`nil`, expect all source file names to match the following regex.
549
+ # Only the file name itself is matched, not the entire file path.
550
+ # Use anchors as necessary if you want to match the entire name rather than
551
+ # just a part of it.
552
+ Regex: ~
553
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
554
+ # report offending filenames for executable scripts (i.e. source
555
+ # files with a shebang in the first line).
556
+ IgnoreExecutableScripts: true
557
+ AllowedAcronyms:
558
+ - CLI
559
+ - DSL
560
+ - ACL
561
+ - API
562
+ - ASCII
563
+ - CPU
564
+ - CSS
565
+ - DNS
566
+ - EOF
567
+ - GUID
568
+ - HTML
569
+ - HTTP
570
+ - HTTPS
571
+ - ID
572
+ - IP
573
+ - JSON
574
+ - LHS
575
+ - QPS
576
+ - RAM
577
+ - RHS
578
+ - RPC
579
+ - SLA
580
+ - SMTP
581
+ - SQL
582
+ - SSH
583
+ - TCP
584
+ - TLS
585
+ - TTL
586
+ - UDP
587
+ - UI
588
+ - UID
589
+ - UUID
590
+ - URI
591
+ - URL
592
+ - UTF8
593
+ - VM
594
+ - XML
595
+ - XMPP
596
+ - XSRF
597
+ - XSS
598
+
599
+ Naming/HeredocDelimiterNaming:
600
+ Blacklist:
601
+ - END
602
+ - !ruby/regexp '/EO[A-Z]{1}/'
603
+
604
+ Naming/HeredocDelimiterCase:
605
+ EnforcedStyle: uppercase
606
+ SupportedStyles:
607
+ - lowercase
608
+ - uppercase
609
+
610
+ Naming/MethodName:
611
+ EnforcedStyle: snake_case
612
+ SupportedStyles:
613
+ - snake_case
614
+ - camelCase
615
+
616
+ Naming/PredicateName:
617
+ # Predicate name prefixes.
618
+ NamePrefix:
619
+ - is_
620
+ - has_
621
+ - have_
622
+ # Predicate name prefixes that should be removed.
623
+ NamePrefixBlacklist:
624
+ - is_
625
+ - has_
626
+ - have_
627
+ # Predicate names which, despite having a blacklisted prefix, or no `?`,
628
+ # should still be accepted
629
+ NameWhitelist:
630
+ - is_a?
631
+ # Exclude Rspec specs because there is a strong convention to write spec
632
+ # helpers in the form of `have_something` or `be_something`.
633
+ Exclude:
634
+ - 'spec/**/*'
635
+
636
+ Naming/VariableName:
637
+ EnforcedStyle: snake_case
638
+ SupportedStyles:
639
+ - snake_case
640
+ - camelCase
641
+
642
+ Naming/VariableNumber:
643
+ Enabled: false
644
+ EnforcedStyle: snake_case
645
+ SupportedStyles:
646
+ - snake_case
647
+ - normalcase
648
+ - non_integer
649
+
650
+ #################### Style ###########################
651
+
652
+ Style/Alias:
653
+ EnforcedStyle: prefer_alias
654
+ SupportedStyles:
655
+ - prefer_alias
656
+ - prefer_alias_method
657
+
658
+ Style/AndOr:
659
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
660
+ # or completely (always).
661
+ EnforcedStyle: always
662
+ SupportedStyles:
663
+ - always
664
+ - conditionals
665
+
666
+ # Checks if usage of `%()` or `%Q()` matches configuration.
667
+ Style/BarePercentLiterals:
668
+ EnforcedStyle: bare_percent
669
+ SupportedStyles:
670
+ - percent_q
671
+ - bare_percent
672
+
673
+ Style/BlockDelimiters:
674
+ EnforcedStyle: line_count_based
675
+ SupportedStyles:
676
+ # The `line_count_based` style enforces braces around single line blocks and
677
+ # do..end around multi-line blocks.
678
+ - line_count_based
679
+ # The `semantic` style enforces braces around functional blocks, where the
680
+ # primary purpose of the block is to return a value and do..end for
681
+ # procedural blocks, where the primary purpose of the block is its
682
+ # side-effects.
683
+ #
684
+ # This looks at the usage of a block's method to determine its type (e.g. is
685
+ # the result of a `map` assigned to a variable or passed to another
686
+ # method) but exceptions are permitted in the `ProceduralMethods`,
687
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
688
+ - semantic
689
+ # The `braces_for_chaining` style enforces braces around single line blocks
690
+ # and do..end around multi-line blocks, except for multi-line blocks whose
691
+ # return value is being chained with another method (in which case braces
692
+ # are enforced).
693
+ - braces_for_chaining
694
+ ProceduralMethods:
695
+ # Methods that are known to be procedural in nature but look functional from
696
+ # their usage, e.g.
697
+ #
698
+ # time = Benchmark.realtime do
699
+ # foo.bar
700
+ # end
701
+ #
702
+ # Here, the return value of the block is discarded but the return value of
703
+ # `Benchmark.realtime` is used.
704
+ - benchmark
705
+ - bm
706
+ - bmbm
707
+ - create
708
+ - each_with_object
709
+ - measure
710
+ - new
711
+ - realtime
712
+ - tap
713
+ - with_object
714
+ FunctionalMethods:
715
+ # Methods that are known to be functional in nature but look procedural from
716
+ # their usage, e.g.
717
+ #
718
+ # let(:foo) { Foo.new }
719
+ #
720
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
721
+ # doesn't appear to be used from the return value of `let`.
722
+ - let
723
+ - let!
724
+ - subject
725
+ - watch
726
+ IgnoredMethods:
727
+ # Methods that can be either procedural or functional and cannot be
728
+ # categorised from their usage alone, e.g.
729
+ #
730
+ # foo = lambda do |x|
731
+ # puts "Hello, #{x}"
732
+ # end
733
+ #
734
+ # foo = lambda do |x|
735
+ # x * 100
736
+ # end
737
+ #
738
+ # Here, it is impossible to tell from the return value of `lambda` whether
739
+ # the inner block's return value is significant.
740
+ - lambda
741
+ - proc
742
+ - it
743
+
744
+ Style/BracesAroundHashParameters:
745
+ EnforcedStyle: no_braces
746
+ SupportedStyles:
747
+ # The `braces` style enforces braces around all method parameters that are
748
+ # hashes.
749
+ - braces
750
+ # The `no_braces` style checks that the last parameter doesn't have braces
751
+ # around it.
752
+ - no_braces
753
+ # The `context_dependent` style checks that the last parameter doesn't have
754
+ # braces around it, but requires braces if the second to last parameter is
755
+ # also a hash literal.
756
+ - context_dependent
757
+
758
+ Style/ClassAndModuleChildren:
759
+ Enabled: false
760
+ # Checks the style of children definitions at classes and modules.
761
+ #
762
+ # Basically there are two different styles:
763
+ #
764
+ # `nested` - have each child on a separate line
765
+ # class Foo
766
+ # class Bar
767
+ # end
768
+ # end
769
+ #
770
+ # `compact` - combine definitions as much as possible
771
+ # class Foo::Bar
772
+ # end
773
+ #
774
+ # The compact style is only forced, for classes or modules with one child.
775
+ EnforcedStyle: nested
776
+ SupportedStyles:
777
+ - nested
778
+ - compact
779
+
780
+ Style/ClassCheck:
781
+ EnforcedStyle: is_a?
782
+ SupportedStyles:
783
+ - is_a?
784
+ - kind_of?
785
+
786
+ # Align with the style guide.
787
+ Style/CollectionMethods:
788
+ # Mapping from undesired method to desired_method
789
+ # e.g. to use `detect` over `find`:
790
+ #
791
+ # CollectionMethods:
792
+ # PreferredMethods:
793
+ # find: detect
794
+ PreferredMethods:
795
+ collect: 'map'
796
+ collect!: 'map!'
797
+ inject: 'reduce'
798
+ detect: 'find'
799
+ find_all: 'select'
800
+
801
+ # Use '`' or '%x' around command literals.
802
+ Style/CommandLiteral:
803
+ EnforcedStyle: backticks
804
+ # backticks: Always use backticks.
805
+ # percent_x: Always use `%x`.
806
+ # mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
807
+ SupportedStyles:
808
+ - backticks
809
+ - percent_x
810
+ - mixed
811
+ # If `false`, the cop will always recommend using `%x` if one or more backticks
812
+ # are found in the command string.
813
+ AllowInnerBackticks: false
814
+
815
+ # Checks formatting of special comments
816
+ Style/CommentAnnotation:
817
+ Keywords:
818
+ - TODO
819
+ - FIXME
820
+ - OPTIMIZE
821
+ - HACK
822
+ - REVIEW
823
+
824
+ Style/ConditionalAssignment:
825
+ EnforcedStyle: assign_to_condition
826
+ SupportedStyles:
827
+ - assign_to_condition
828
+ - assign_inside_condition
829
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
830
+ # will only register an offense when all branches of a condition are
831
+ # a single line.
832
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
833
+ # will only register an offense for assignment to a condition that has
834
+ # at least one multiline branch.
835
+ SingleLineConditionsOnly: true
836
+ IncludeTernaryExpressions: true
837
+
838
+ # Checks that you have put a copyright in a comment before any code.
839
+ #
840
+ # You can override the default Notice in your .rubocop.yml file.
841
+ #
842
+ # In order to use autocorrect, you must supply a value for the
843
+ # `AutocorrectNotice` key that matches the regexp Notice. A blank
844
+ # `AutocorrectNotice` will cause an error during autocorrect.
845
+ #
846
+ # Autocorrect will add a copyright notice in a comment at the top
847
+ # of the file immediately after any shebang or encoding comments.
848
+ #
849
+ # Example rubocop.yml:
850
+ #
851
+ # Style/Copyright:
852
+ # Enabled: true
853
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
854
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
855
+ #
856
+ Style/Copyright:
857
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
858
+ AutocorrectNotice: ''
859
+
860
+ Style/DocumentationMethod:
861
+ RequireForNonPublicMethods: false
862
+
863
+ # Warn on empty else statements
864
+ # empty - warn only on empty `else`
865
+ # nil - warn on `else` with nil in it
866
+ # both - warn on empty `else` and `else` with `nil` in it
867
+ Style/EmptyElse:
868
+ EnforcedStyle: both
869
+ SupportedStyles:
870
+ - empty
871
+ - nil
872
+ - both
873
+
874
+ Style/EmptyMethod:
875
+ EnforcedStyle: compact
876
+ SupportedStyles:
877
+ - compact
878
+ - expanded
879
+
880
+ # Checks use of for or each in multiline loops.
881
+ Style/For:
882
+ EnforcedStyle: each
883
+ SupportedStyles:
884
+ - for
885
+ - each
886
+
887
+ # Enforce the method used for string formatting.
888
+ Style/FormatString:
889
+ EnforcedStyle: format
890
+ SupportedStyles:
891
+ - format
892
+ - sprintf
893
+ - percent
894
+
895
+ # Enforce using either `%<token>s` or `%{token}`
896
+ Style/FormatStringToken:
897
+ EnforcedStyle: annotated
898
+ SupportedStyles:
899
+ # Prefer tokens which contain a sprintf like type annotation like
900
+ # `%<name>s`, `%<age>d`, `%<score>f`
901
+ - annotated
902
+ # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
903
+ - template
904
+
905
+ Style/FrozenStringLiteralComment:
906
+ EnforcedStyle: when_needed
907
+ SupportedStyles:
908
+ # `when_needed` will add the frozen string literal comment to files
909
+ # only when the `TargetRubyVersion` is set to 2.3+.
910
+ - when_needed
911
+ # `always` will always add the frozen string literal comment to a file
912
+ # regardless of the Ruby version or if `freeze` or `<<` are called on a
913
+ # string literal. If you run code against multiple versions of Ruby, it is
914
+ # possible that this will create errors in Ruby 2.3.0+.
915
+ - always
916
+ # `never` will enforce that the frozen string literal comment does not
917
+ # exist in a file.
918
+ - never
919
+
920
+ # Built-in global variables are allowed by default.
921
+ Style/GlobalVars:
922
+ AllowedVariables: []
923
+
924
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
925
+ # needs to have to trigger this cop
926
+ Style/GuardClause:
927
+ MinBodyLength: 1
928
+
929
+ Style/HashSyntax:
930
+ EnforcedStyle: ruby19
931
+ SupportedStyles:
932
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
933
+ - ruby19
934
+ # checks for hash rocket syntax for all hashes
935
+ - hash_rockets
936
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
937
+ - no_mixed_keys
938
+ # enforces both ruby19 and no_mixed_keys styles
939
+ - ruby19_no_mixed_keys
940
+ # Force hashes that have a symbol value to use hash rockets
941
+ UseHashRocketsWithSymbolValues: false
942
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
943
+ PreferHashRocketsForNonAlnumEndingSymbols: false
944
+
945
+ Style/InverseMethods:
946
+ Enabled: true
947
+ # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
948
+ # The relationship of inverse methods only needs to be defined in one direction.
949
+ # Keys and values both need to be defined as symbols.
950
+ InverseMethods:
951
+ :any?: :none?
952
+ :even?: :odd?
953
+ :==: :!=
954
+ :=~: :!~
955
+ :<: :>=
956
+ :>: :<=
957
+ # `ActiveSupport` defines some common inverse methods. They are listed below,
958
+ # and not enabled by default.
959
+ #:present?: :blank?,
960
+ #:include?: :exclude?
961
+ # `InverseBlocks` are methods that are inverted by inverting the return
962
+ # of the block that is passed to the method
963
+ InverseBlocks:
964
+ :select: :reject
965
+ :select!: :reject!
966
+
967
+ Style/Lambda:
968
+ EnforcedStyle: line_count_dependent
969
+ SupportedStyles:
970
+ - line_count_dependent
971
+ - lambda
972
+ - literal
973
+
974
+ Style/LambdaCall:
975
+ EnforcedStyle: call
976
+ SupportedStyles:
977
+ - call
978
+ - braces
979
+
980
+ Style/MethodCallWithArgsParentheses:
981
+ IgnoreMacros: true
982
+ IgnoredMethods: []
983
+
984
+ Style/MethodDefParentheses:
985
+ EnforcedStyle: require_parentheses
986
+ SupportedStyles:
987
+ - require_parentheses
988
+ - require_no_parentheses
989
+ - require_no_parentheses_except_multiline
990
+
991
+ # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
992
+ # `module` bodies.
993
+ Style/MixinGrouping:
994
+ EnforcedStyle: separated
995
+ SupportedStyles:
996
+ # separated: each mixed in module goes in a separate statement.
997
+ # grouped: mixed in modules are grouped into a single statement.
998
+ - separated
999
+ - grouped
1000
+
1001
+ Style/ModuleFunction:
1002
+ EnforcedStyle: module_function
1003
+ SupportedStyles:
1004
+ - module_function
1005
+ - extend_self
1006
+
1007
+ Style/MultilineMemoization:
1008
+ EnforcedStyle: keyword
1009
+ SupportedStyles:
1010
+ - keyword
1011
+ - braces
1012
+
1013
+ Style/NegatedIf:
1014
+ EnforcedStyle: both
1015
+ SupportedStyles:
1016
+ # both: prefix and postfix negated `if` should both use `unless`
1017
+ # prefix: only use `unless` for negated `if` statements positioned before the body of the statement
1018
+ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement
1019
+ - both
1020
+ - prefix
1021
+ - postfix
1022
+
1023
+ Style/NestedParenthesizedCalls:
1024
+ Whitelist:
1025
+ - be
1026
+ - be_a
1027
+ - be_an
1028
+ - be_between
1029
+ - be_falsey
1030
+ - be_kind_of
1031
+ - be_instance_of
1032
+ - be_truthy
1033
+ - be_within
1034
+ - eq
1035
+ - eql
1036
+ - end_with
1037
+ - include
1038
+ - match
1039
+ - raise_error
1040
+ - respond_to
1041
+ - start_with
1042
+
1043
+ Style/Next:
1044
+ # With `always` all conditions at the end of an iteration needs to be
1045
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
1046
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
1047
+ EnforcedStyle: skip_modifier_ifs
1048
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
1049
+ # needs to have to trigger this cop
1050
+ MinBodyLength: 3
1051
+ SupportedStyles:
1052
+ - skip_modifier_ifs
1053
+ - always
1054
+
1055
+ Style/NonNilCheck:
1056
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
1057
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
1058
+ # **usually** OK, but might change behavior.
1059
+ #
1060
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
1061
+ # offenses for `!x.nil?` and does no changes that might change behavior.
1062
+ IncludeSemanticChanges: false
1063
+
1064
+ Style/NumericLiterals:
1065
+ MinDigits: 5
1066
+ Strict: false
1067
+
1068
+ Style/NumericLiteralPrefix:
1069
+ EnforcedOctalStyle: zero_with_o
1070
+ SupportedOctalStyles:
1071
+ - zero_with_o
1072
+ - zero_only
1073
+
1074
+ Style/NumericPredicate:
1075
+ EnforcedStyle: predicate
1076
+ SupportedStyles:
1077
+ - predicate
1078
+ - comparison
1079
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
1080
+ # false positives.
1081
+ Exclude:
1082
+ - 'spec/**/*'
1083
+
1084
+ Style/OptionHash:
1085
+ # A list of parameter names that will be flagged by this cop.
1086
+ SuspiciousParamNames:
1087
+ - options
1088
+ - opts
1089
+ - args
1090
+ - params
1091
+ - parameters
1092
+
1093
+ # Allow safe assignment in conditions.
1094
+ Style/ParenthesesAroundCondition:
1095
+ AllowSafeAssignment: true
1096
+
1097
+ Style/PercentLiteralDelimiters:
1098
+ # Specify the default preferred delimiter for all types with the 'default' key
1099
+ # Override individual delimiters (even with default specified) by specifying
1100
+ # an individual key
1101
+ PreferredDelimiters:
1102
+ default: ()
1103
+
1104
+ Style/PercentQLiterals:
1105
+ EnforcedStyle: lower_case_q
1106
+ SupportedStyles:
1107
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
1108
+ - upper_case_q # Always use `%Q`
1109
+
1110
+ Style/PreferredHashMethods:
1111
+ EnforcedStyle: short
1112
+ SupportedStyles:
1113
+ - short
1114
+ - verbose
1115
+
1116
+ Style/RaiseArgs:
1117
+ EnforcedStyle: exploded
1118
+ SupportedStyles:
1119
+ - compact # raise Exception.new(msg)
1120
+ - exploded # raise Exception, msg
1121
+
1122
+ Style/RedundantReturn:
1123
+ # When `true` allows code like `return x, y`.
1124
+ AllowMultipleReturnValues: false
1125
+
1126
+ # Use `/` or `%r` around regular expressions.
1127
+ Style/RegexpLiteral:
1128
+ EnforcedStyle: slashes
1129
+ # slashes: Always use slashes.
1130
+ # percent_r: Always use `%r`.
1131
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
1132
+ SupportedStyles:
1133
+ - slashes
1134
+ - percent_r
1135
+ - mixed
1136
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
1137
+ # are found in the regexp string.
1138
+ AllowInnerSlashes: false
1139
+
1140
+ Style/ReturnNil:
1141
+ EnforcedStyle: return
1142
+ SupportedStyles:
1143
+ - return
1144
+ - return_nil
1145
+
1146
+ Style/SafeNavigation:
1147
+ # Safe navigation may cause a statement to start returning `nil` in addition
1148
+ # to whatever it used to return.
1149
+ ConvertCodeThatCanStartToReturnNil: false
1150
+
1151
+ Style/Semicolon:
1152
+ # Allow `;` to separate several expressions on the same line.
1153
+ AllowAsExpressionSeparator: false
1154
+
1155
+ Style/SignalException:
1156
+ EnforcedStyle: only_raise
1157
+ SupportedStyles:
1158
+ - only_raise
1159
+ - only_fail
1160
+ - semantic
1161
+
1162
+ Style/SingleLineBlockParams:
1163
+ Methods:
1164
+ - reduce:
1165
+ - acc
1166
+ - elem
1167
+ - inject:
1168
+ - acc
1169
+ - elem
1170
+
1171
+ Style/SingleLineMethods:
1172
+ AllowIfMethodIsEmpty: true
1173
+
1174
+ Style/SpecialGlobalVars:
1175
+ EnforcedStyle: use_english_names
1176
+ SupportedStyles:
1177
+ - use_perl_names
1178
+ - use_english_names
1179
+
1180
+ Style/StabbyLambdaParentheses:
1181
+ EnforcedStyle: require_parentheses
1182
+ SupportedStyles:
1183
+ - require_parentheses
1184
+ - require_no_parentheses
1185
+
1186
+ Style/StringLiterals:
1187
+ EnforcedStyle: single_quotes
1188
+ SupportedStyles:
1189
+ - single_quotes
1190
+ - double_quotes
1191
+ # If `true`, strings which span multiple lines using `\` for continuation must
1192
+ # use the same type of quotes on each line.
1193
+ ConsistentQuotesInMultiline: false
1194
+
1195
+ Style/StringLiteralsInInterpolation:
1196
+ EnforcedStyle: single_quotes
1197
+ SupportedStyles:
1198
+ - single_quotes
1199
+ - double_quotes
1200
+
1201
+ Style/StringMethods:
1202
+ # Mapping from undesired method to desired_method
1203
+ # e.g. to use `to_sym` over `intern`:
1204
+ #
1205
+ # StringMethods:
1206
+ # PreferredMethods:
1207
+ # intern: to_sym
1208
+ PreferredMethods:
1209
+ intern: to_sym
1210
+
1211
+ Style/SymbolArray:
1212
+ EnforcedStyle: percent
1213
+ MinSize: 0
1214
+ SupportedStyles:
1215
+ - percent
1216
+ - brackets
1217
+
1218
+ Style/SymbolProc:
1219
+ # A list of method names to be ignored by the check.
1220
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
1221
+ IgnoredMethods:
1222
+ - respond_to
1223
+ - define_method
1224
+
1225
+ Style/TernaryParentheses:
1226
+ EnforcedStyle: require_no_parentheses
1227
+ SupportedStyles:
1228
+ - require_parentheses
1229
+ - require_no_parentheses
1230
+ - require_parentheses_when_complex
1231
+ AllowSafeAssignment: true
1232
+
1233
+ Style/TrailingCommaInArguments:
1234
+ # If `comma`, the cop requires a comma after the last argument, but only for
1235
+ # parenthesized method calls where each argument is on its own line.
1236
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1237
+ # for all parenthesized method calls with arguments.
1238
+ EnforcedStyleForMultiline: no_comma
1239
+ SupportedStylesForMultiline:
1240
+ - comma
1241
+ - consistent_comma
1242
+ - no_comma
1243
+
1244
+ Style/TrailingCommaInArrayLiteral:
1245
+ # If `comma`, the cop requires a comma after the last item in an array or
1246
+ # hash, but only when each item is on its own line.
1247
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1248
+ # non-empty array and hash literals.
1249
+ EnforcedStyleForMultiline: no_comma
1250
+ SupportedStylesForMultiline:
1251
+ - comma
1252
+ - consistent_comma
1253
+ - no_comma
1254
+
1255
+ Style/TrailingCommaInHashLiteral:
1256
+ # If `comma`, the cop requires a comma after the last item in an array or
1257
+ # hash, but only when each item is on its own line.
1258
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1259
+ # non-empty array and hash literals.
1260
+ EnforcedStyleForMultiline: no_comma
1261
+ SupportedStylesForMultiline:
1262
+ - comma
1263
+ - consistent_comma
1264
+ - no_comma
1265
+
1266
+ # `TrivialAccessors` requires exact name matches and doesn't allow
1267
+ # predicated methods by default.
1268
+ Style/TrivialAccessors:
1269
+ # When set to `false` the cop will suggest the use of accessor methods
1270
+ # in situations like:
1271
+ #
1272
+ # def name
1273
+ # @other_name
1274
+ # end
1275
+ #
1276
+ # This way you can uncover "hidden" attributes in your code.
1277
+ ExactNameMatch: true
1278
+ AllowPredicates: true
1279
+ # Allows trivial writers that don't end in an equal sign. e.g.
1280
+ #
1281
+ # def on_exception(action)
1282
+ # @on_exception=action
1283
+ # end
1284
+ # on_exception :restart
1285
+ #
1286
+ # Commonly used in DSLs
1287
+ AllowDSLWriters: false
1288
+ IgnoreClassMethods: false
1289
+ Whitelist:
1290
+ - to_ary
1291
+ - to_a
1292
+ - to_c
1293
+ - to_enum
1294
+ - to_h
1295
+ - to_hash
1296
+ - to_i
1297
+ - to_int
1298
+ - to_io
1299
+ - to_open
1300
+ - to_path
1301
+ - to_proc
1302
+ - to_r
1303
+ - to_regexp
1304
+ - to_str
1305
+ - to_s
1306
+ - to_sym
1307
+
1308
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1309
+ Style/WordArray:
1310
+ EnforcedStyle: percent
1311
+ SupportedStyles:
1312
+ # percent style: %w(word1 word2)
1313
+ - percent
1314
+ # bracket style: ['word1', 'word2']
1315
+ - brackets
1316
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1317
+ # smaller than a certain size. The rule is only applied to arrays
1318
+ # whose element count is greater than or equal to `MinSize`.
1319
+ MinSize: 0
1320
+ # The regular expression `WordRegex` decides what is considered a word.
1321
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1322
+
1323
+ Style/YodaCondition:
1324
+ EnforcedStyle: all_comparison_operators
1325
+ SupportedStyles:
1326
+ # check all comparison operators
1327
+ - all_comparison_operators
1328
+ # check only equality operators: `!=` and `==`
1329
+ - equality_operators_only
1330
+
1331
+ #################### Metrics ###############################
1332
+
1333
+ Metrics/AbcSize:
1334
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1335
+ # a Float.
1336
+ Max: 100
1337
+
1338
+ Metrics/BlockLength:
1339
+ CountComments: false # count full line comments?
1340
+ Max: 1000
1341
+ ExcludedMethods: []
1342
+
1343
+ Metrics/BlockNesting:
1344
+ CountBlocks: false
1345
+ Max: 3
1346
+
1347
+ Metrics/ClassLength:
1348
+ enabled: false
1349
+ CountComments: false # count full line comments?
1350
+ Max: 1000
1351
+
1352
+ # Avoid complex methods.
1353
+ Metrics/CyclomaticComplexity:
1354
+ enabled: false
1355
+ Max: 25
1356
+
1357
+ Metrics/LineLength:
1358
+ enabled: false
1359
+ Max: 300
1360
+ # To make it possible to copy or click on URIs in the code, we allow lines
1361
+ # containing a URI to be longer than Max.
1362
+ AllowHeredoc: true
1363
+ AllowURI: true
1364
+ URISchemes:
1365
+ - http
1366
+ - https
1367
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1368
+ # directives like '# rubocop: enable ...' when calculating a line's length.
1369
+ IgnoreCopDirectives: false
1370
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1371
+ # elements. Strings will be converted to Regexp objects. A line that matches
1372
+ # any regular expression listed in this option will be ignored by LineLength.
1373
+ IgnoredPatterns: []
1374
+
1375
+ Metrics/MethodLength:
1376
+ enabled: false
1377
+ CountComments: false # count full line comments?
1378
+ Max: 200
1379
+
1380
+ Metrics/ModuleLength:
1381
+ enabled: false
1382
+ CountComments: false # count full line comments?
1383
+ Max: 1000
1384
+
1385
+ Metrics/ParameterLists:
1386
+ Max: 5
1387
+ CountKeywordArgs: true
1388
+
1389
+ Metrics/PerceivedComplexity:
1390
+ enabled: false
1391
+ Max: 70
1392
+
1393
+ #################### Lint ##################################
1394
+
1395
+ # Allow safe assignment in conditions.
1396
+ Lint/AssignmentInCondition:
1397
+ AllowSafeAssignment: true
1398
+
1399
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1400
+ Lint/BlockAlignment:
1401
+ # The value `start_of_block` means that the `end` should be aligned with line
1402
+ # where the `do` keyword appears.
1403
+ # The value `start_of_line` means it should be aligned with the whole
1404
+ # expression's starting line.
1405
+ # The value `either` means both are allowed.
1406
+ EnforcedStyleAlignWith: either
1407
+ SupportedStylesAlignWith:
1408
+ - either
1409
+ - start_of_block
1410
+ - start_of_line
1411
+
1412
+ Lint/DefEndAlignment:
1413
+ # The value `def` means that `end` should be aligned with the def keyword.
1414
+ # The value `start_of_line` means that `end` should be aligned with method
1415
+ # calls like `private`, `public`, etc, if present in front of the `def`
1416
+ # keyword on the same line.
1417
+ EnforcedStyleAlignWith: start_of_line
1418
+ SupportedStylesAlignWith:
1419
+ - start_of_line
1420
+ - def
1421
+ AutoCorrect: false
1422
+
1423
+ # Align ends correctly.
1424
+ Lint/EndAlignment:
1425
+ # The value `keyword` means that `end` should be aligned with the matching
1426
+ # keyword (`if`, `while`, etc.).
1427
+ # The value `variable` means that in assignments, `end` should be aligned
1428
+ # with the start of the variable on the left hand side of `=`. In all other
1429
+ # situations, `end` should still be aligned with the keyword.
1430
+ # The value `start_of_line` means that `end` should be aligned with the start
1431
+ # of the line which the matching keyword appears on.
1432
+ EnforcedStyleAlignWith: keyword
1433
+ SupportedStylesAlignWith:
1434
+ - keyword
1435
+ - variable
1436
+ - start_of_line
1437
+ AutoCorrect: false
1438
+
1439
+ Lint/InheritException:
1440
+ # The default base class in favour of `Exception`.
1441
+ EnforcedStyle: runtime_error
1442
+ SupportedStyles:
1443
+ - runtime_error
1444
+ - standard_error
1445
+
1446
+ Lint/SafeNavigationChain:
1447
+ Whitelist:
1448
+ - present?
1449
+ - blank?
1450
+ - presence
1451
+ - try
1452
+
1453
+ # Checks for unused block arguments
1454
+ Lint/UnusedBlockArgument:
1455
+ IgnoreEmptyBlocks: true
1456
+ AllowUnusedKeywordArguments: false
1457
+
1458
+ # Checks for unused method arguments.
1459
+ Lint/UnusedMethodArgument:
1460
+ AllowUnusedKeywordArguments: false
1461
+ IgnoreEmptyMethods: true
1462
+
1463
+ #################### Performance ###########################
1464
+
1465
+ Performance/DoubleStartEndWith:
1466
+ # Used to check for `starts_with?` and `ends_with?`.
1467
+ # These methods are defined by `ActiveSupport`.
1468
+ IncludeActiveSupportAliases: false
1469
+
1470
+ Performance/RedundantMerge:
1471
+ # Max number of key-value pairs to consider an offense
1472
+ MaxKeyValuePairs: 2