seira 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 256dbac66a813483a7161e4fa6aa6315d891a29f
4
+ data.tar.gz: 62ec8a83156018ab7f37bd81b7d8157aec2d80a6
5
+ SHA512:
6
+ metadata.gz: f63b97107f175f9049495a11954249783f2ef46b15d469c0d4084ff5dba5af754e24d0da5b7e665f05e6a000823c4cc5bc17b3798f9a0d07695145e34d51ddb4
7
+ data.tar.gz: 31dd7a82d485fef7072d3088320a4c90b03418f505cc87d0d61c2d2ca8fda0b9052818b70a98c1b58e371df90d5334146f0fb89cc86ead6608734f8c78d601dd
@@ -0,0 +1,1614 @@
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/IfUnlessModifier:
954
+ MaxLineLength: 80
955
+
956
+ Style/InverseMethods:
957
+ Enabled: true
958
+ # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
959
+ # The relationship of inverse methods only needs to be defined in one direction.
960
+ # Keys and values both need to be defined as symbols.
961
+ InverseMethods:
962
+ :any?: :none?
963
+ :even?: :odd?
964
+ :==: :!=
965
+ :=~: :!~
966
+ :<: :>=
967
+ :>: :<=
968
+ # `ActiveSupport` defines some common inverse methods. They are listed below,
969
+ # and not enabled by default.
970
+ #:present?: :blank?,
971
+ #:include?: :exclude?
972
+ # `InverseBlocks` are methods that are inverted by inverting the return
973
+ # of the block that is passed to the method
974
+ InverseBlocks:
975
+ :select: :reject
976
+ :select!: :reject!
977
+
978
+ Style/Lambda:
979
+ EnforcedStyle: line_count_dependent
980
+ SupportedStyles:
981
+ - line_count_dependent
982
+ - lambda
983
+ - literal
984
+
985
+ Style/LambdaCall:
986
+ EnforcedStyle: call
987
+ SupportedStyles:
988
+ - call
989
+ - braces
990
+
991
+ Style/MethodCallWithArgsParentheses:
992
+ IgnoreMacros: true
993
+ IgnoredMethods: []
994
+
995
+ Style/MethodDefParentheses:
996
+ EnforcedStyle: require_parentheses
997
+ SupportedStyles:
998
+ - require_parentheses
999
+ - require_no_parentheses
1000
+ - require_no_parentheses_except_multiline
1001
+
1002
+ # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1003
+ # `module` bodies.
1004
+ Style/MixinGrouping:
1005
+ EnforcedStyle: separated
1006
+ SupportedStyles:
1007
+ # separated: each mixed in module goes in a separate statement.
1008
+ # grouped: mixed in modules are grouped into a single statement.
1009
+ - separated
1010
+ - grouped
1011
+
1012
+ Style/ModuleFunction:
1013
+ EnforcedStyle: module_function
1014
+ SupportedStyles:
1015
+ - module_function
1016
+ - extend_self
1017
+
1018
+ Style/MultilineMemoization:
1019
+ EnforcedStyle: keyword
1020
+ SupportedStyles:
1021
+ - keyword
1022
+ - braces
1023
+
1024
+ Style/NegatedIf:
1025
+ EnforcedStyle: both
1026
+ SupportedStyles:
1027
+ # both: prefix and postfix negated `if` should both use `unless`
1028
+ # prefix: only use `unless` for negated `if` statements positioned before the body of the statement
1029
+ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement
1030
+ - both
1031
+ - prefix
1032
+ - postfix
1033
+
1034
+ Style/NestedParenthesizedCalls:
1035
+ Whitelist:
1036
+ - be
1037
+ - be_a
1038
+ - be_an
1039
+ - be_between
1040
+ - be_falsey
1041
+ - be_kind_of
1042
+ - be_instance_of
1043
+ - be_truthy
1044
+ - be_within
1045
+ - eq
1046
+ - eql
1047
+ - end_with
1048
+ - include
1049
+ - match
1050
+ - raise_error
1051
+ - respond_to
1052
+ - start_with
1053
+
1054
+ Style/Next:
1055
+ # With `always` all conditions at the end of an iteration needs to be
1056
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
1057
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
1058
+ EnforcedStyle: skip_modifier_ifs
1059
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
1060
+ # needs to have to trigger this cop
1061
+ MinBodyLength: 3
1062
+ SupportedStyles:
1063
+ - skip_modifier_ifs
1064
+ - always
1065
+
1066
+ Style/NonNilCheck:
1067
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
1068
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
1069
+ # **usually** OK, but might change behavior.
1070
+ #
1071
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
1072
+ # offenses for `!x.nil?` and does no changes that might change behavior.
1073
+ IncludeSemanticChanges: false
1074
+
1075
+ Style/NumericLiterals:
1076
+ MinDigits: 5
1077
+ Strict: false
1078
+
1079
+ Style/NumericLiteralPrefix:
1080
+ EnforcedOctalStyle: zero_with_o
1081
+ SupportedOctalStyles:
1082
+ - zero_with_o
1083
+ - zero_only
1084
+
1085
+ Style/NumericPredicate:
1086
+ EnforcedStyle: predicate
1087
+ SupportedStyles:
1088
+ - predicate
1089
+ - comparison
1090
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
1091
+ # false positives.
1092
+ Exclude:
1093
+ - 'spec/**/*'
1094
+
1095
+ Style/OptionHash:
1096
+ # A list of parameter names that will be flagged by this cop.
1097
+ SuspiciousParamNames:
1098
+ - options
1099
+ - opts
1100
+ - args
1101
+ - params
1102
+ - parameters
1103
+
1104
+ # Allow safe assignment in conditions.
1105
+ Style/ParenthesesAroundCondition:
1106
+ AllowSafeAssignment: true
1107
+
1108
+ Style/PercentLiteralDelimiters:
1109
+ # Specify the default preferred delimiter for all types with the 'default' key
1110
+ # Override individual delimiters (even with default specified) by specifying
1111
+ # an individual key
1112
+ PreferredDelimiters:
1113
+ default: ()
1114
+ '%i': '[]'
1115
+ '%I': '[]'
1116
+ '%r': '{}'
1117
+ '%w': '[]'
1118
+ '%W': '[]'
1119
+
1120
+ Style/PercentQLiterals:
1121
+ EnforcedStyle: lower_case_q
1122
+ SupportedStyles:
1123
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
1124
+ - upper_case_q # Always use `%Q`
1125
+
1126
+ Style/PreferredHashMethods:
1127
+ EnforcedStyle: short
1128
+ SupportedStyles:
1129
+ - short
1130
+ - verbose
1131
+
1132
+ Style/RaiseArgs:
1133
+ EnforcedStyle: exploded
1134
+ SupportedStyles:
1135
+ - compact # raise Exception.new(msg)
1136
+ - exploded # raise Exception, msg
1137
+
1138
+ Style/RedundantReturn:
1139
+ # When `true` allows code like `return x, y`.
1140
+ AllowMultipleReturnValues: false
1141
+
1142
+ # Use `/` or `%r` around regular expressions.
1143
+ Style/RegexpLiteral:
1144
+ EnforcedStyle: slashes
1145
+ # slashes: Always use slashes.
1146
+ # percent_r: Always use `%r`.
1147
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
1148
+ SupportedStyles:
1149
+ - slashes
1150
+ - percent_r
1151
+ - mixed
1152
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
1153
+ # are found in the regexp string.
1154
+ AllowInnerSlashes: false
1155
+
1156
+ Style/ReturnNil:
1157
+ EnforcedStyle: return
1158
+ SupportedStyles:
1159
+ - return
1160
+ - return_nil
1161
+
1162
+ Style/SafeNavigation:
1163
+ # Safe navigation may cause a statement to start returning `nil` in addition
1164
+ # to whatever it used to return.
1165
+ ConvertCodeThatCanStartToReturnNil: false
1166
+
1167
+ Style/Semicolon:
1168
+ # Allow `;` to separate several expressions on the same line.
1169
+ AllowAsExpressionSeparator: false
1170
+
1171
+ Style/SignalException:
1172
+ EnforcedStyle: only_raise
1173
+ SupportedStyles:
1174
+ - only_raise
1175
+ - only_fail
1176
+ - semantic
1177
+
1178
+ Style/SingleLineBlockParams:
1179
+ Methods:
1180
+ - reduce:
1181
+ - acc
1182
+ - elem
1183
+ - inject:
1184
+ - acc
1185
+ - elem
1186
+
1187
+ Style/SingleLineMethods:
1188
+ AllowIfMethodIsEmpty: true
1189
+
1190
+ Style/SpecialGlobalVars:
1191
+ EnforcedStyle: use_english_names
1192
+ SupportedStyles:
1193
+ - use_perl_names
1194
+ - use_english_names
1195
+
1196
+ Style/StabbyLambdaParentheses:
1197
+ EnforcedStyle: require_parentheses
1198
+ SupportedStyles:
1199
+ - require_parentheses
1200
+ - require_no_parentheses
1201
+
1202
+ Style/StringLiterals:
1203
+ EnforcedStyle: single_quotes
1204
+ SupportedStyles:
1205
+ - single_quotes
1206
+ - double_quotes
1207
+ # If `true`, strings which span multiple lines using `\` for continuation must
1208
+ # use the same type of quotes on each line.
1209
+ ConsistentQuotesInMultiline: false
1210
+
1211
+ Style/StringLiteralsInInterpolation:
1212
+ EnforcedStyle: single_quotes
1213
+ SupportedStyles:
1214
+ - single_quotes
1215
+ - double_quotes
1216
+
1217
+ Style/StringMethods:
1218
+ # Mapping from undesired method to desired_method
1219
+ # e.g. to use `to_sym` over `intern`:
1220
+ #
1221
+ # StringMethods:
1222
+ # PreferredMethods:
1223
+ # intern: to_sym
1224
+ PreferredMethods:
1225
+ intern: to_sym
1226
+
1227
+ Style/SymbolArray:
1228
+ EnforcedStyle: percent
1229
+ MinSize: 0
1230
+ SupportedStyles:
1231
+ - percent
1232
+ - brackets
1233
+
1234
+ Style/SymbolProc:
1235
+ # A list of method names to be ignored by the check.
1236
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
1237
+ IgnoredMethods:
1238
+ - respond_to
1239
+ - define_method
1240
+
1241
+ Style/TernaryParentheses:
1242
+ EnforcedStyle: require_no_parentheses
1243
+ SupportedStyles:
1244
+ - require_parentheses
1245
+ - require_no_parentheses
1246
+ - require_parentheses_when_complex
1247
+ AllowSafeAssignment: true
1248
+
1249
+ Style/TrailingCommaInArguments:
1250
+ # If `comma`, the cop requires a comma after the last argument, but only for
1251
+ # parenthesized method calls where each argument is on its own line.
1252
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1253
+ # for all parenthesized method calls with arguments.
1254
+ EnforcedStyleForMultiline: no_comma
1255
+ SupportedStylesForMultiline:
1256
+ - comma
1257
+ - consistent_comma
1258
+ - no_comma
1259
+
1260
+ Style/TrailingCommaInLiteral:
1261
+ # If `comma`, the cop requires a comma after the last item in an array or
1262
+ # hash, but only when each item is on its own line.
1263
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1264
+ # non-empty array and hash literals.
1265
+ EnforcedStyleForMultiline: no_comma
1266
+ SupportedStylesForMultiline:
1267
+ - comma
1268
+ - consistent_comma
1269
+ - no_comma
1270
+
1271
+ # `TrivialAccessors` requires exact name matches and doesn't allow
1272
+ # predicated methods by default.
1273
+ Style/TrivialAccessors:
1274
+ # When set to `false` the cop will suggest the use of accessor methods
1275
+ # in situations like:
1276
+ #
1277
+ # def name
1278
+ # @other_name
1279
+ # end
1280
+ #
1281
+ # This way you can uncover "hidden" attributes in your code.
1282
+ ExactNameMatch: true
1283
+ AllowPredicates: true
1284
+ # Allows trivial writers that don't end in an equal sign. e.g.
1285
+ #
1286
+ # def on_exception(action)
1287
+ # @on_exception=action
1288
+ # end
1289
+ # on_exception :restart
1290
+ #
1291
+ # Commonly used in DSLs
1292
+ AllowDSLWriters: false
1293
+ IgnoreClassMethods: false
1294
+ Whitelist:
1295
+ - to_ary
1296
+ - to_a
1297
+ - to_c
1298
+ - to_enum
1299
+ - to_h
1300
+ - to_hash
1301
+ - to_i
1302
+ - to_int
1303
+ - to_io
1304
+ - to_open
1305
+ - to_path
1306
+ - to_proc
1307
+ - to_r
1308
+ - to_regexp
1309
+ - to_str
1310
+ - to_s
1311
+ - to_sym
1312
+
1313
+ Style/WhileUntilModifier:
1314
+ MaxLineLength: 80
1315
+
1316
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1317
+ Style/WordArray:
1318
+ EnforcedStyle: percent
1319
+ SupportedStyles:
1320
+ # percent style: %w(word1 word2)
1321
+ - percent
1322
+ # bracket style: ['word1', 'word2']
1323
+ - brackets
1324
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1325
+ # smaller than a certain size. The rule is only applied to arrays
1326
+ # whose element count is greater than or equal to `MinSize`.
1327
+ MinSize: 0
1328
+ # The regular expression `WordRegex` decides what is considered a word.
1329
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1330
+
1331
+ Style/YodaCondition:
1332
+ EnforcedStyle: all_comparison_operators
1333
+ SupportedStyles:
1334
+ # check all comparison operators
1335
+ - all_comparison_operators
1336
+ # check only equality operators: `!=` and `==`
1337
+ - equality_operators_only
1338
+
1339
+ #################### Metrics ###############################
1340
+
1341
+ Metrics/AbcSize:
1342
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1343
+ # a Float.
1344
+ Max: 15
1345
+
1346
+ Metrics/BlockLength:
1347
+ CountComments: false # count full line comments?
1348
+ Max: 25
1349
+ ExcludedMethods: []
1350
+
1351
+ Metrics/BlockNesting:
1352
+ CountBlocks: false
1353
+ Max: 3
1354
+
1355
+ Metrics/ClassLength:
1356
+ CountComments: false # count full line comments?
1357
+ Max: 100
1358
+
1359
+ # Avoid complex methods.
1360
+ Metrics/CyclomaticComplexity:
1361
+ Max: 6
1362
+
1363
+ Metrics/LineLength:
1364
+ Max: 80
1365
+ # To make it possible to copy or click on URIs in the code, we allow lines
1366
+ # containing a URI to be longer than Max.
1367
+ AllowHeredoc: true
1368
+ AllowURI: true
1369
+ URISchemes:
1370
+ - http
1371
+ - https
1372
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1373
+ # directives like '# rubocop: enable ...' when calculating a line's length.
1374
+ IgnoreCopDirectives: false
1375
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1376
+ # elements. Strings will be converted to Regexp objects. A line that matches
1377
+ # any regular expression listed in this option will be ignored by LineLength.
1378
+ IgnoredPatterns: []
1379
+
1380
+ Metrics/MethodLength:
1381
+ CountComments: false # count full line comments?
1382
+ Max: 10
1383
+
1384
+ Metrics/ModuleLength:
1385
+ CountComments: false # count full line comments?
1386
+ Max: 100
1387
+
1388
+ Metrics/ParameterLists:
1389
+ Max: 5
1390
+ CountKeywordArgs: true
1391
+
1392
+ Metrics/PerceivedComplexity:
1393
+ Max: 7
1394
+
1395
+ #################### Lint ##################################
1396
+
1397
+ # Allow safe assignment in conditions.
1398
+ Lint/AssignmentInCondition:
1399
+ AllowSafeAssignment: true
1400
+
1401
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1402
+ Lint/BlockAlignment:
1403
+ # The value `start_of_block` means that the `end` should be aligned with line
1404
+ # where the `do` keyword appears.
1405
+ # The value `start_of_line` means it should be aligned with the whole
1406
+ # expression's starting line.
1407
+ # The value `either` means both are allowed.
1408
+ EnforcedStyleAlignWith: either
1409
+ SupportedStylesAlignWith:
1410
+ - either
1411
+ - start_of_block
1412
+ - start_of_line
1413
+
1414
+ Lint/DefEndAlignment:
1415
+ # The value `def` means that `end` should be aligned with the def keyword.
1416
+ # The value `start_of_line` means that `end` should be aligned with method
1417
+ # calls like `private`, `public`, etc, if present in front of the `def`
1418
+ # keyword on the same line.
1419
+ EnforcedStyleAlignWith: start_of_line
1420
+ SupportedStylesAlignWith:
1421
+ - start_of_line
1422
+ - def
1423
+ AutoCorrect: false
1424
+
1425
+ # Align ends correctly.
1426
+ Lint/EndAlignment:
1427
+ # The value `keyword` means that `end` should be aligned with the matching
1428
+ # keyword (`if`, `while`, etc.).
1429
+ # The value `variable` means that in assignments, `end` should be aligned
1430
+ # with the start of the variable on the left hand side of `=`. In all other
1431
+ # situations, `end` should still be aligned with the keyword.
1432
+ # The value `start_of_line` means that `end` should be aligned with the start
1433
+ # of the line which the matching keyword appears on.
1434
+ EnforcedStyleAlignWith: keyword
1435
+ SupportedStylesAlignWith:
1436
+ - keyword
1437
+ - variable
1438
+ - start_of_line
1439
+ AutoCorrect: false
1440
+
1441
+ Lint/InheritException:
1442
+ # The default base class in favour of `Exception`.
1443
+ EnforcedStyle: runtime_error
1444
+ SupportedStyles:
1445
+ - runtime_error
1446
+ - standard_error
1447
+
1448
+ Lint/SafeNavigationChain:
1449
+ Whitelist:
1450
+ - present?
1451
+ - blank?
1452
+ - presence
1453
+ - try
1454
+
1455
+ # Checks for unused block arguments
1456
+ Lint/UnusedBlockArgument:
1457
+ IgnoreEmptyBlocks: true
1458
+ AllowUnusedKeywordArguments: false
1459
+
1460
+ # Checks for unused method arguments.
1461
+ Lint/UnusedMethodArgument:
1462
+ AllowUnusedKeywordArguments: false
1463
+ IgnoreEmptyMethods: true
1464
+
1465
+ #################### Performance ###########################
1466
+
1467
+ Performance/DoubleStartEndWith:
1468
+ # Used to check for `starts_with?` and `ends_with?`.
1469
+ # These methods are defined by `ActiveSupport`.
1470
+ IncludeActiveSupportAliases: false
1471
+
1472
+ Performance/RedundantMerge:
1473
+ # Max number of key-value pairs to consider an offense
1474
+ MaxKeyValuePairs: 2
1475
+
1476
+ #################### Rails #################################
1477
+
1478
+ Rails/ActionFilter:
1479
+ EnforcedStyle: action
1480
+ SupportedStyles:
1481
+ - action
1482
+ - filter
1483
+ Include:
1484
+ - app/controllers/**/*.rb
1485
+
1486
+ Rails/Date:
1487
+ # The value `strict` disallows usage of `Date.today`, `Date.current`,
1488
+ # `Date#to_time` etc.
1489
+ # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
1490
+ # (but not `Date.today`) which are overridden by ActiveSupport to handle current
1491
+ # time zone.
1492
+ EnforcedStyle: flexible
1493
+ SupportedStyles:
1494
+ - strict
1495
+ - flexible
1496
+
1497
+ Rails/Delegate:
1498
+ # When set to true, using the target object as a prefix of the
1499
+ # method name without using the `delegate` method will be a
1500
+ # violation. When set to false, this case is legal.
1501
+ EnforceForPrefixed: true
1502
+
1503
+ Rails/DynamicFindBy:
1504
+ Whitelist:
1505
+ - find_by_sql
1506
+
1507
+ Rails/EnumUniqueness:
1508
+ Include:
1509
+ - app/models/**/*.rb
1510
+
1511
+ Rails/Exit:
1512
+ Include:
1513
+ - app/**/*.rb
1514
+ - config/**/*.rb
1515
+ - lib/**/*.rb
1516
+ Exclude:
1517
+ - lib/**/*.rake
1518
+
1519
+ Rails/FindBy:
1520
+ Include:
1521
+ - app/models/**/*.rb
1522
+
1523
+ Rails/FindEach:
1524
+ Include:
1525
+ - app/models/**/*.rb
1526
+
1527
+ Rails/HasAndBelongsToMany:
1528
+ Include:
1529
+ - app/models/**/*.rb
1530
+
1531
+ Rails/HasManyOrHasOneDependent:
1532
+ Include:
1533
+ - app/models/**/*.rb
1534
+
1535
+ Rails/NotNullColumn:
1536
+ Include:
1537
+ - db/migrate/*.rb
1538
+
1539
+ Rails/Output:
1540
+ Include:
1541
+ - app/**/*.rb
1542
+ - config/**/*.rb
1543
+ - db/**/*.rb
1544
+ - lib/**/*.rb
1545
+
1546
+ Rails/ReadWriteAttribute:
1547
+ Include:
1548
+ - app/models/**/*.rb
1549
+
1550
+ Rails/RequestReferer:
1551
+ EnforcedStyle: referer
1552
+ SupportedStyles:
1553
+ - referer
1554
+ - referrer
1555
+
1556
+ Rails/ReversibleMigration:
1557
+ Include:
1558
+ - db/migrate/*.rb
1559
+
1560
+ Rails/SafeNavigation:
1561
+ # This will convert usages of `try` to use safe navigation as well as `try!`.
1562
+ # `try` and `try!` work slighly differently. `try!` and safe navigation will
1563
+ # both raise a `NoMethodError` if the receiver of the method call does not
1564
+ # implement the intended method. `try` will not raise an exception for this.
1565
+ ConvertTry: false
1566
+
1567
+ Rails/ScopeArgs:
1568
+ Include:
1569
+ - app/models/**/*.rb
1570
+
1571
+ Rails/TimeZone:
1572
+ # The value `strict` means that `Time` should be used with `zone`.
1573
+ # The value `flexible` allows usage of `in_time_zone` instead of `zone`.
1574
+ EnforcedStyle: flexible
1575
+ SupportedStyles:
1576
+ - strict
1577
+ - flexible
1578
+
1579
+ Rails/UniqBeforePluck:
1580
+ EnforcedStyle: conservative
1581
+ SupportedStyles:
1582
+ - conservative
1583
+ - aggressive
1584
+ AutoCorrect: false
1585
+
1586
+ Rails/UnknownEnv:
1587
+ Environments:
1588
+ - development
1589
+ - test
1590
+ - production
1591
+
1592
+ Rails/SkipsModelValidations:
1593
+ Blacklist:
1594
+ - decrement!
1595
+ - decrement_counter
1596
+ - increment!
1597
+ - increment_counter
1598
+ - toggle!
1599
+ - touch
1600
+ - update_all
1601
+ - update_attribute
1602
+ - update_column
1603
+ - update_columns
1604
+ - update_counters
1605
+
1606
+ Rails/Validation:
1607
+ Include:
1608
+ - app/models/**/*.rb
1609
+
1610
+ Bundler/OrderedGems:
1611
+ TreatCommentsAsGroupSeparators: true
1612
+
1613
+ Gemspec/OrderedDependencies:
1614
+ TreatCommentsAsGroupSeparators: true