broadside 3.1.1 → 3.1.2

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