rubocop-rubomatic 1.3.0 → 1.4.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +15 -0
- data/config/bundler.yml +0 -22
- data/config/default.yml +0 -4
- data/config/gemspec_on.yml +0 -23
- data/config/layout.yml +0 -346
- data/config/lint.yml +6 -403
- data/config/metrics.yml +0 -41
- data/config/migration.yml +0 -4
- data/config/naming.yml +0 -68
- data/config/performance.yml +3 -128
- data/config/security.yml +0 -31
- data/config/style.yml +14 -931
- data/lib/rubocop/rubomatic/version.rb +1 -1
- metadata +8 -8
data/config/layout.yml
CHANGED
@@ -1,21 +1,12 @@
|
|
1
1
|
Layout/AccessModifierIndentation:
|
2
|
-
Description: Check indentation of private/protected visibility modifiers.
|
3
|
-
StyleGuide: '#indent-public-private-protected'
|
4
2
|
Enabled: true
|
5
|
-
VersionAdded: '0.49'
|
6
3
|
EnforcedStyle: indent
|
7
4
|
SupportedStyles:
|
8
5
|
- outdent
|
9
6
|
- indent
|
10
7
|
|
11
8
|
Layout/ArgumentAlignment:
|
12
|
-
Description: >-
|
13
|
-
Align the arguments of a method call if they span more
|
14
|
-
than one line.
|
15
|
-
StyleGuide: '#no-double-indent'
|
16
9
|
Enabled: true
|
17
|
-
VersionAdded: '0.68'
|
18
|
-
VersionChanged: '0.77'
|
19
10
|
# Alignment of arguments in multi-line method calls.
|
20
11
|
#
|
21
12
|
# The `with_first_argument` style aligns the following lines along the same
|
@@ -35,13 +26,7 @@ Layout/ArgumentAlignment:
|
|
35
26
|
- with_fixed_indentation
|
36
27
|
|
37
28
|
Layout/ArrayAlignment:
|
38
|
-
Description: >-
|
39
|
-
Align the elements of an array literal if they span more than
|
40
|
-
one line.
|
41
|
-
StyleGuide: '#no-double-indent'
|
42
29
|
Enabled: true
|
43
|
-
VersionAdded: '0.49'
|
44
|
-
VersionChanged: '0.77'
|
45
30
|
# Alignment of elements of a multi-line array.
|
46
31
|
#
|
47
32
|
# The `with_first_parameter` style aligns the following lines along the same
|
@@ -61,17 +46,10 @@ Layout/ArrayAlignment:
|
|
61
46
|
- with_fixed_indentation
|
62
47
|
|
63
48
|
Layout/AssignmentIndentation:
|
64
|
-
Description: >-
|
65
|
-
Checks the indentation of the first line of the
|
66
|
-
right-hand-side of a multi-line assignment.
|
67
49
|
Enabled: true
|
68
|
-
VersionAdded: '0.49'
|
69
|
-
VersionChanged: '1.40'
|
70
50
|
|
71
51
|
Layout/BeginEndAlignment:
|
72
|
-
Description: 'Align ends corresponding to begins correctly.'
|
73
52
|
Enabled: true
|
74
|
-
VersionAdded: '0.91'
|
75
53
|
# The value `start_of_line` means that `end` should be aligned the start of the line
|
76
54
|
# where the `begin` keyword is.
|
77
55
|
# The value `begin` means that `end` should be aligned with the `begin` keyword.
|
@@ -82,9 +60,7 @@ Layout/BeginEndAlignment:
|
|
82
60
|
Severity: warning
|
83
61
|
|
84
62
|
Layout/BlockAlignment:
|
85
|
-
Description: 'Align block ends correctly.'
|
86
63
|
Enabled: true
|
87
|
-
VersionAdded: '0.53'
|
88
64
|
# The value `start_of_block` means that the `end` should be aligned with line
|
89
65
|
# where the `do` keyword appears.
|
90
66
|
# The value `start_of_line` means it should be aligned with the whole
|
@@ -97,16 +73,10 @@ Layout/BlockAlignment:
|
|
97
73
|
- start_of_line
|
98
74
|
|
99
75
|
Layout/BlockEndNewline:
|
100
|
-
Description: 'Put end statement of multiline block on its own line.'
|
101
76
|
Enabled: true
|
102
|
-
VersionAdded: '0.49'
|
103
77
|
|
104
78
|
Layout/CaseIndentation:
|
105
|
-
Description: 'Indentation of when in a case/(when|in)/[else/]end.'
|
106
|
-
StyleGuide: '#indent-when-to-case'
|
107
79
|
Enabled: true
|
108
|
-
VersionAdded: '0.49'
|
109
|
-
VersionChanged: '1.16'
|
110
80
|
EnforcedStyle: case
|
111
81
|
SupportedStyles:
|
112
82
|
- case
|
@@ -114,10 +84,7 @@ Layout/CaseIndentation:
|
|
114
84
|
IndentOneStep: false
|
115
85
|
|
116
86
|
Layout/ClassStructure:
|
117
|
-
Description: 'Enforces a configured order of definitions within a class body.'
|
118
|
-
StyleGuide: '#consistent-classes'
|
119
87
|
Enabled: true
|
120
|
-
VersionAdded: '0.52'
|
121
88
|
Categories:
|
122
89
|
default_scope:
|
123
90
|
- default_scope
|
@@ -202,37 +169,22 @@ Layout/ClassStructure:
|
|
202
169
|
- private_methods
|
203
170
|
|
204
171
|
Layout/ClosingHeredocIndentation:
|
205
|
-
Description: 'Checks the indentation of here document closings.'
|
206
172
|
Enabled: true
|
207
|
-
VersionAdded: '0.57'
|
208
173
|
|
209
174
|
Layout/ClosingParenthesisIndentation:
|
210
|
-
Description: 'Checks the indentation of hanging closing parentheses.'
|
211
175
|
Enabled: true
|
212
|
-
VersionAdded: '0.49'
|
213
176
|
|
214
177
|
Layout/CommentIndentation:
|
215
|
-
Description: 'Indentation of comments.'
|
216
178
|
Enabled: true
|
217
179
|
# When true, allows comments to have extra indentation if that aligns them
|
218
180
|
# with a comment on the preceding line.
|
219
181
|
AllowForAlignment: false
|
220
|
-
VersionAdded: '0.49'
|
221
|
-
VersionChanged: '1.24'
|
222
182
|
|
223
183
|
Layout/ConditionPosition:
|
224
|
-
Description: >-
|
225
|
-
Checks for condition placed in a confusing position relative to
|
226
|
-
the keyword.
|
227
|
-
StyleGuide: '#same-line-condition'
|
228
184
|
Enabled: true
|
229
|
-
VersionAdded: '0.53'
|
230
|
-
VersionChanged: '0.83'
|
231
185
|
|
232
186
|
Layout/DefEndAlignment:
|
233
|
-
Description: 'Align ends corresponding to defs correctly.'
|
234
187
|
Enabled: true
|
235
|
-
VersionAdded: '0.53'
|
236
188
|
# The value `def` means that `end` should be aligned with the def keyword.
|
237
189
|
# The value `start_of_line` means that `end` should be aligned with method
|
238
190
|
# calls like `private`, `public`, etc, if present in front of the `def`
|
@@ -244,53 +196,32 @@ Layout/DefEndAlignment:
|
|
244
196
|
Severity: warning
|
245
197
|
|
246
198
|
Layout/DotPosition:
|
247
|
-
Description: 'Checks the position of the dot in multi-line method calls.'
|
248
|
-
StyleGuide: '#consistent-multi-line-chains'
|
249
199
|
Enabled: true
|
250
|
-
VersionAdded: '0.49'
|
251
200
|
EnforcedStyle: leading
|
252
201
|
SupportedStyles:
|
253
202
|
- leading
|
254
203
|
- trailing
|
255
204
|
|
256
205
|
Layout/ElseAlignment:
|
257
|
-
Description: 'Align elses and elsifs correctly.'
|
258
206
|
Enabled: true
|
259
|
-
VersionAdded: '0.49'
|
260
207
|
|
261
208
|
Layout/EmptyComment:
|
262
|
-
Description: 'Checks empty comment.'
|
263
209
|
Enabled: true
|
264
|
-
VersionAdded: '0.53'
|
265
210
|
AllowBorderComment: true
|
266
211
|
AllowMarginComment: true
|
267
212
|
|
268
213
|
Layout/EmptyLineAfterGuardClause:
|
269
|
-
Description: 'Add empty line after guard clause.'
|
270
214
|
Enabled: true
|
271
|
-
VersionAdded: '0.56'
|
272
|
-
VersionChanged: '0.59'
|
273
215
|
|
274
216
|
Layout/EmptyLineAfterMagicComment:
|
275
|
-
Description: 'Add an empty line after magic comments to separate them from code.'
|
276
|
-
StyleGuide: '#separate-magic-comments-from-code'
|
277
217
|
Enabled: true
|
278
|
-
VersionAdded: '0.49'
|
279
218
|
|
280
219
|
Layout/EmptyLineAfterMultilineCondition:
|
281
|
-
Description: 'Enforces empty line after multiline condition.'
|
282
220
|
# This is disabled, because this style is not very common in practice.
|
283
221
|
Enabled: false
|
284
|
-
VersionAdded: '0.90'
|
285
|
-
Reference:
|
286
|
-
- https://github.com/airbnb/ruby#multiline-if-newline
|
287
222
|
|
288
223
|
Layout/EmptyLineBetweenDefs:
|
289
|
-
Description: 'Use empty lines between class/module/method defs.'
|
290
|
-
StyleGuide: '#empty-lines-between-methods'
|
291
224
|
Enabled: true
|
292
|
-
VersionAdded: '0.49'
|
293
|
-
VersionChanged: '1.23'
|
294
225
|
EmptyLineBetweenMethodDefs: true
|
295
226
|
EmptyLineBetweenClassDefs: true
|
296
227
|
EmptyLineBetweenModuleDefs: true
|
@@ -301,35 +232,20 @@ Layout/EmptyLineBetweenDefs:
|
|
301
232
|
NumberOfEmptyLines: 1
|
302
233
|
|
303
234
|
Layout/EmptyLines:
|
304
|
-
Description: "Don't use several empty lines in a row."
|
305
|
-
StyleGuide: '#two-or-more-empty-lines'
|
306
235
|
Enabled: true
|
307
|
-
VersionAdded: '0.49'
|
308
236
|
|
309
237
|
Layout/EmptyLinesAroundAccessModifier:
|
310
|
-
Description: "Keep blank lines around access modifiers."
|
311
|
-
StyleGuide: '#empty-lines-around-access-modifier'
|
312
238
|
Enabled: true
|
313
|
-
VersionAdded: '0.49'
|
314
239
|
EnforcedStyle: around
|
315
240
|
SupportedStyles:
|
316
241
|
- around
|
317
242
|
- only_before
|
318
|
-
Reference:
|
319
|
-
# A reference to `EnforcedStyle: only_before`.
|
320
|
-
- https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
|
321
243
|
|
322
244
|
Layout/EmptyLinesAroundArguments:
|
323
|
-
Description: "Keeps track of empty lines around method arguments."
|
324
245
|
Enabled: true
|
325
|
-
VersionAdded: '0.52'
|
326
246
|
|
327
247
|
Layout/EmptyLinesAroundAttributeAccessor:
|
328
|
-
Description: "Keep blank lines around attribute accessors."
|
329
|
-
StyleGuide: '#empty-lines-around-attribute-accessor'
|
330
248
|
Enabled: true
|
331
|
-
VersionAdded: '0.83'
|
332
|
-
VersionChanged: '0.84'
|
333
249
|
AllowAliasSyntax: true
|
334
250
|
AllowedMethods:
|
335
251
|
- alias_method
|
@@ -338,27 +254,17 @@ Layout/EmptyLinesAroundAttributeAccessor:
|
|
338
254
|
- private
|
339
255
|
|
340
256
|
Layout/EmptyLinesAroundBeginBody:
|
341
|
-
Description: "Keeps track of empty lines around begin-end bodies."
|
342
|
-
StyleGuide: '#empty-lines-around-bodies'
|
343
257
|
Enabled: true
|
344
|
-
VersionAdded: '0.49'
|
345
258
|
|
346
259
|
Layout/EmptyLinesAroundBlockBody:
|
347
|
-
Description: "Keeps track of empty lines around block bodies."
|
348
|
-
StyleGuide: '#empty-lines-around-bodies'
|
349
260
|
Enabled: true
|
350
|
-
VersionAdded: '0.49'
|
351
261
|
EnforcedStyle: no_empty_lines
|
352
262
|
SupportedStyles:
|
353
263
|
- empty_lines
|
354
264
|
- no_empty_lines
|
355
265
|
|
356
266
|
Layout/EmptyLinesAroundClassBody:
|
357
|
-
Description: "Keeps track of empty lines around class bodies."
|
358
|
-
StyleGuide: '#empty-lines-around-bodies'
|
359
267
|
Enabled: true
|
360
|
-
VersionAdded: '0.49'
|
361
|
-
VersionChanged: '0.53'
|
362
268
|
EnforcedStyle: no_empty_lines
|
363
269
|
SupportedStyles:
|
364
270
|
- empty_lines
|
@@ -369,22 +275,13 @@ Layout/EmptyLinesAroundClassBody:
|
|
369
275
|
- ending_only
|
370
276
|
|
371
277
|
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
372
|
-
Description: "Keeps track of empty lines around exception handling keywords."
|
373
|
-
StyleGuide: '#empty-lines-around-bodies'
|
374
278
|
Enabled: true
|
375
|
-
VersionAdded: '0.49'
|
376
279
|
|
377
280
|
Layout/EmptyLinesAroundMethodBody:
|
378
|
-
Description: "Keeps track of empty lines around method bodies."
|
379
|
-
StyleGuide: '#empty-lines-around-bodies'
|
380
281
|
Enabled: true
|
381
|
-
VersionAdded: '0.49'
|
382
282
|
|
383
283
|
Layout/EmptyLinesAroundModuleBody:
|
384
|
-
Description: "Keeps track of empty lines around module bodies."
|
385
|
-
StyleGuide: '#empty-lines-around-bodies'
|
386
284
|
Enabled: true
|
387
|
-
VersionAdded: '0.49'
|
388
285
|
EnforcedStyle: no_empty_lines
|
389
286
|
SupportedStyles:
|
390
287
|
- empty_lines
|
@@ -393,9 +290,7 @@ Layout/EmptyLinesAroundModuleBody:
|
|
393
290
|
- no_empty_lines
|
394
291
|
|
395
292
|
Layout/EndAlignment:
|
396
|
-
Description: 'Align ends correctly.'
|
397
293
|
Enabled: true
|
398
|
-
VersionAdded: '0.53'
|
399
294
|
# The value `keyword` means that `end` should be aligned with the matching
|
400
295
|
# keyword (`if`, `while`, etc.).
|
401
296
|
# The value `variable` means that in assignments, `end` should be aligned
|
@@ -411,10 +306,7 @@ Layout/EndAlignment:
|
|
411
306
|
Severity: warning
|
412
307
|
|
413
308
|
Layout/EndOfLine:
|
414
|
-
Description: 'Use Unix-style line endings.'
|
415
|
-
StyleGuide: '#crlf'
|
416
309
|
Enabled: true
|
417
|
-
VersionAdded: '0.49'
|
418
310
|
# The `native` style means that CR+LF (Carriage Return + Line Feed) is
|
419
311
|
# enforced on Windows, and LF is enforced on other platforms. The other styles
|
420
312
|
# mean LF and CR+LF, respectively.
|
@@ -425,9 +317,7 @@ Layout/EndOfLine:
|
|
425
317
|
- crlf
|
426
318
|
|
427
319
|
Layout/ExtraSpacing:
|
428
|
-
Description: 'Do not use unnecessary spacing.'
|
429
320
|
Enabled: true
|
430
|
-
VersionAdded: '0.49'
|
431
321
|
# When true, allows most uses of extra spacing if the intent is to align
|
432
322
|
# things with the previous or next line, not counting empty lines or comment
|
433
323
|
# lines.
|
@@ -440,10 +330,7 @@ Layout/ExtraSpacing:
|
|
440
330
|
ForceEqualSignAlignment: false
|
441
331
|
|
442
332
|
Layout/FirstArgumentIndentation:
|
443
|
-
Description: 'Checks the indentation of the first argument in a method call.'
|
444
333
|
Enabled: true
|
445
|
-
VersionAdded: '0.68'
|
446
|
-
VersionChanged: '0.77'
|
447
334
|
EnforcedStyle: consistent
|
448
335
|
SupportedStyles:
|
449
336
|
# The first parameter should always be indented one step more than the
|
@@ -462,12 +349,7 @@ Layout/FirstArgumentIndentation:
|
|
462
349
|
- special_for_inner_method_call_in_parentheses
|
463
350
|
|
464
351
|
Layout/FirstArrayElementIndentation:
|
465
|
-
Description: >-
|
466
|
-
Checks the indentation of the first element in an array
|
467
|
-
literal.
|
468
352
|
Enabled: true
|
469
|
-
VersionAdded: '0.68'
|
470
|
-
VersionChanged: '0.77'
|
471
353
|
# The value `special_inside_parentheses` means that array literals with
|
472
354
|
# brackets that have their opening bracket on the same line as a surrounding
|
473
355
|
# opening round parenthesis, shall have their first element indented relative
|
@@ -486,18 +368,11 @@ Layout/FirstArrayElementIndentation:
|
|
486
368
|
- align_brackets
|
487
369
|
|
488
370
|
Layout/FirstArrayElementLineBreak:
|
489
|
-
Description: >-
|
490
|
-
Checks for a line break before the first element in a
|
491
|
-
multi-line array.
|
492
371
|
Enabled: false
|
493
|
-
VersionAdded: '0.49'
|
494
372
|
AllowMultilineFinalElement: false
|
495
373
|
|
496
374
|
Layout/FirstHashElementIndentation:
|
497
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
498
375
|
Enabled: true
|
499
|
-
VersionAdded: '0.68'
|
500
|
-
VersionChanged: '0.77'
|
501
376
|
# The value `special_inside_parentheses` means that hash literals with braces
|
502
377
|
# that have their opening brace on the same line as a surrounding opening
|
503
378
|
# round parenthesis, shall have their first key indented relative to the
|
@@ -516,49 +391,27 @@ Layout/FirstHashElementIndentation:
|
|
516
391
|
- align_braces
|
517
392
|
|
518
393
|
Layout/FirstHashElementLineBreak:
|
519
|
-
Description: >-
|
520
|
-
Checks for a line break before the first element in a
|
521
|
-
multi-line hash.
|
522
394
|
Enabled: false
|
523
|
-
VersionAdded: '0.49'
|
524
395
|
AllowMultilineFinalElement: false
|
525
396
|
|
526
397
|
Layout/FirstMethodArgumentLineBreak:
|
527
|
-
Description: >-
|
528
|
-
Checks for a line break before the first argument in a
|
529
|
-
multi-line method call.
|
530
398
|
Enabled: true
|
531
|
-
VersionAdded: '0.49'
|
532
399
|
AllowMultilineFinalElement: true
|
533
400
|
|
534
401
|
Layout/FirstMethodParameterLineBreak:
|
535
|
-
Description: >-
|
536
|
-
Checks for a line break before the first parameter in a
|
537
|
-
multi-line method parameter definition.
|
538
402
|
Enabled: false
|
539
|
-
VersionAdded: '0.49'
|
540
403
|
AllowMultilineFinalElement: false
|
541
404
|
|
542
405
|
Layout/FirstParameterIndentation:
|
543
|
-
Description: >-
|
544
|
-
Checks the indentation of the first parameter in a
|
545
|
-
method definition.
|
546
406
|
Enabled: true
|
547
|
-
VersionAdded: '0.49'
|
548
|
-
VersionChanged: '0.77'
|
549
407
|
EnforcedStyle: consistent
|
550
408
|
SupportedStyles:
|
551
409
|
- consistent
|
552
410
|
- align_parentheses
|
553
411
|
|
554
412
|
Layout/HashAlignment:
|
555
|
-
Description: >-
|
556
|
-
Align the elements of a hash literal if they span more than
|
557
|
-
one line.
|
558
413
|
Enabled: true
|
559
414
|
AllowMultipleStyles: true
|
560
|
-
VersionAdded: '0.49'
|
561
|
-
VersionChanged: '1.16'
|
562
415
|
# Alignment of entries using hash rocket as separator. Valid values are:
|
563
416
|
#
|
564
417
|
# key - left alignment of keys
|
@@ -634,25 +487,13 @@ Layout/HashAlignment:
|
|
634
487
|
- ignore_explicit
|
635
488
|
|
636
489
|
Layout/HeredocArgumentClosingParenthesis:
|
637
|
-
Description: >-
|
638
|
-
Checks for the placement of the closing parenthesis in a
|
639
|
-
method call that passes a HEREDOC string as an argument.
|
640
490
|
Enabled: false
|
641
|
-
StyleGuide: '#heredoc-argument-closing-parentheses'
|
642
|
-
VersionAdded: '0.68'
|
643
491
|
|
644
492
|
Layout/HeredocIndentation:
|
645
|
-
Description: 'Checks the indentation of the here document bodies.'
|
646
|
-
StyleGuide: '#squiggly-heredocs'
|
647
493
|
Enabled: true
|
648
|
-
VersionAdded: '0.49'
|
649
|
-
VersionChanged: '0.85'
|
650
494
|
|
651
495
|
Layout/IndentationConsistency:
|
652
|
-
Description: 'Keep indentation straight.'
|
653
|
-
StyleGuide: '#spaces-indentation'
|
654
496
|
Enabled: true
|
655
|
-
VersionAdded: '0.49'
|
656
497
|
# The difference between `indented` and `normal` is that the `indented_internal_methods`
|
657
498
|
# style prescribes that in classes and modules the `protected` and `private`
|
658
499
|
# modifier keywords shall be indented the same as public methods and that
|
@@ -663,91 +504,56 @@ Layout/IndentationConsistency:
|
|
663
504
|
SupportedStyles:
|
664
505
|
- normal
|
665
506
|
- indented_internal_methods
|
666
|
-
Reference:
|
667
|
-
# A reference to `EnforcedStyle: indented_internal_methods`.
|
668
|
-
- https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
|
669
507
|
|
670
508
|
Layout/IndentationStyle:
|
671
|
-
Description: 'Consistent indentation either with tabs only or spaces only.'
|
672
|
-
StyleGuide: '#spaces-indentation'
|
673
509
|
Enabled: true
|
674
|
-
VersionAdded: '0.49'
|
675
|
-
VersionChanged: '0.82'
|
676
510
|
EnforcedStyle: spaces
|
677
511
|
SupportedStyles:
|
678
512
|
- spaces
|
679
513
|
- tabs
|
680
514
|
|
681
515
|
Layout/IndentationWidth:
|
682
|
-
Description: 'Use 2 spaces for indentation.'
|
683
|
-
StyleGuide: '#spaces-indentation'
|
684
516
|
Enabled: true
|
685
|
-
VersionAdded: '0.49'
|
686
517
|
# Number of spaces for each indentation level.
|
687
518
|
Width: 2
|
688
519
|
AllowedPatterns: [ ]
|
689
520
|
|
690
521
|
Layout/InitialIndentation:
|
691
|
-
Description: >-
|
692
|
-
Checks the indentation of the first non-blank non-comment line in a file.
|
693
522
|
Enabled: true
|
694
|
-
VersionAdded: '0.49'
|
695
523
|
|
696
524
|
Layout/LeadingCommentSpace:
|
697
|
-
Description: 'Comments should start with a space.'
|
698
|
-
StyleGuide: '#hash-space'
|
699
525
|
Enabled: true
|
700
|
-
VersionAdded: '0.49'
|
701
|
-
VersionChanged: '0.73'
|
702
526
|
AllowDoxygenCommentStyle: false
|
703
527
|
AllowGemfileRubyComment: false
|
704
528
|
|
705
529
|
Layout/LeadingEmptyLines:
|
706
|
-
Description: Check for unnecessary blank lines at the beginning of a file.
|
707
530
|
Enabled: true
|
708
|
-
VersionAdded: '0.57'
|
709
|
-
VersionChanged: '0.77'
|
710
531
|
|
711
532
|
Layout/LineContinuationLeadingSpace:
|
712
|
-
Description: >-
|
713
|
-
Use trailing spaces instead of leading spaces in strings
|
714
|
-
broken over multiple lines (by a backslash).
|
715
533
|
Enabled: true
|
716
534
|
AutoCorrect: false
|
717
|
-
VersionAdded: '1.31'
|
718
|
-
VersionChanged: '1.32'
|
719
535
|
EnforcedStyle: trailing
|
720
536
|
SupportedStyles:
|
721
537
|
- leading
|
722
538
|
- trailing
|
723
539
|
|
724
540
|
Layout/LineContinuationSpacing:
|
725
|
-
Description: 'Checks the spacing in front of backslash in line continuations.'
|
726
541
|
Enabled: true
|
727
542
|
AutoCorrect: true
|
728
|
-
VersionAdded: '1.31'
|
729
543
|
EnforcedStyle: space
|
730
544
|
SupportedStyles:
|
731
545
|
- space
|
732
546
|
- no_space
|
733
547
|
|
734
548
|
Layout/LineEndStringConcatenationIndentation:
|
735
|
-
Description: >-
|
736
|
-
Checks the indentation of the next line after a line that
|
737
|
-
ends with a string literal and a backslash.
|
738
549
|
Enabled: true
|
739
|
-
VersionAdded: '1.18'
|
740
550
|
EnforcedStyle: indented
|
741
551
|
SupportedStyles:
|
742
552
|
- aligned
|
743
553
|
- indented
|
744
554
|
|
745
555
|
Layout/LineLength:
|
746
|
-
Description: 'Checks that line length does not exceed the configured limit.'
|
747
|
-
StyleGuide: '#max-line-length'
|
748
556
|
Enabled: true
|
749
|
-
VersionAdded: '0.25'
|
750
|
-
VersionChanged: '1.4'
|
751
557
|
Max: 120
|
752
558
|
# To make it possible to copy or click on URIs in the code, we allow lines
|
753
559
|
# containing a URI to be longer than Max.
|
@@ -765,12 +571,7 @@ Layout/LineLength:
|
|
765
571
|
AllowedPatterns: [ ]
|
766
572
|
|
767
573
|
Layout/MultilineArrayBraceLayout:
|
768
|
-
Description: >-
|
769
|
-
Checks that the closing brace in an array literal is
|
770
|
-
either on the same line as the last array element, or
|
771
|
-
a new line.
|
772
574
|
Enabled: true
|
773
|
-
VersionAdded: '0.49'
|
774
575
|
EnforcedStyle: symmetrical
|
775
576
|
SupportedStyles:
|
776
577
|
# symmetrical: closing brace is positioned in same way as opening brace
|
@@ -781,18 +582,11 @@ Layout/MultilineArrayBraceLayout:
|
|
781
582
|
- same_line
|
782
583
|
|
783
584
|
Layout/MultilineArrayLineBreaks:
|
784
|
-
Description: >-
|
785
|
-
Checks that each item in a multi-line array literal
|
786
|
-
starts on a separate line.
|
787
585
|
Enabled: false
|
788
|
-
VersionAdded: '0.67'
|
789
586
|
AllowMultilineFinalElement: false
|
790
587
|
|
791
588
|
Layout/MultilineAssignmentLayout:
|
792
|
-
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
793
|
-
StyleGuide: '#indent-conditional-assignment'
|
794
589
|
Enabled: true
|
795
|
-
VersionAdded: '0.49'
|
796
590
|
# The types of assignments which are subject to this rule.
|
797
591
|
SupportedTypes:
|
798
592
|
- case
|
@@ -810,17 +604,10 @@ Layout/MultilineAssignmentLayout:
|
|
810
604
|
- new_line
|
811
605
|
|
812
606
|
Layout/MultilineBlockLayout:
|
813
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
814
607
|
Enabled: true
|
815
|
-
VersionAdded: '0.49'
|
816
608
|
|
817
609
|
Layout/MultilineHashBraceLayout:
|
818
|
-
Description: >-
|
819
|
-
Checks that the closing brace in a hash literal is
|
820
|
-
either on the same line as the last hash element, or
|
821
|
-
a new line.
|
822
610
|
Enabled: true
|
823
|
-
VersionAdded: '0.49'
|
824
611
|
EnforcedStyle: symmetrical
|
825
612
|
SupportedStyles:
|
826
613
|
# symmetrical: closing brace is positioned in same way as opening brace
|
@@ -831,28 +618,15 @@ Layout/MultilineHashBraceLayout:
|
|
831
618
|
- same_line
|
832
619
|
|
833
620
|
Layout/MultilineHashKeyLineBreaks:
|
834
|
-
Description: >-
|
835
|
-
Checks that each item in a multi-line hash literal
|
836
|
-
starts on a separate line.
|
837
621
|
Enabled: true
|
838
|
-
VersionAdded: '0.67'
|
839
622
|
AllowMultilineFinalElement: false
|
840
623
|
|
841
624
|
Layout/MultilineMethodArgumentLineBreaks:
|
842
|
-
Description: >-
|
843
|
-
Checks that each argument in a multi-line method call
|
844
|
-
starts on a separate line.
|
845
625
|
Enabled: true
|
846
|
-
VersionAdded: '0.67'
|
847
626
|
AllowMultilineFinalElement: true
|
848
627
|
|
849
628
|
Layout/MultilineMethodCallBraceLayout:
|
850
|
-
Description: >-
|
851
|
-
Checks that the closing brace in a method call is
|
852
|
-
either on the same line as the last method argument, or
|
853
|
-
a new line.
|
854
629
|
Enabled: true
|
855
|
-
VersionAdded: '0.49'
|
856
630
|
EnforcedStyle: symmetrical
|
857
631
|
SupportedStyles:
|
858
632
|
# symmetrical: closing brace is positioned in same way as opening brace
|
@@ -863,11 +637,7 @@ Layout/MultilineMethodCallBraceLayout:
|
|
863
637
|
- same_line
|
864
638
|
|
865
639
|
Layout/MultilineMethodCallIndentation:
|
866
|
-
Description: >-
|
867
|
-
Checks indentation of method calls with the dot operator
|
868
|
-
that span more than one line.
|
869
640
|
Enabled: true
|
870
|
-
VersionAdded: '0.49'
|
871
641
|
EnforcedStyle: indented_relative_to_receiver
|
872
642
|
SupportedStyles:
|
873
643
|
- aligned
|
@@ -875,12 +645,7 @@ Layout/MultilineMethodCallIndentation:
|
|
875
645
|
- indented_relative_to_receiver
|
876
646
|
|
877
647
|
Layout/MultilineMethodDefinitionBraceLayout:
|
878
|
-
Description: >-
|
879
|
-
Checks that the closing brace in a method definition is
|
880
|
-
either on the same line as the last method parameter, or
|
881
|
-
a new line.
|
882
648
|
Enabled: true
|
883
|
-
VersionAdded: '0.49'
|
884
649
|
EnforcedStyle: symmetrical
|
885
650
|
SupportedStyles:
|
886
651
|
# symmetrical: closing brace is positioned in same way as opening brace
|
@@ -891,32 +656,18 @@ Layout/MultilineMethodDefinitionBraceLayout:
|
|
891
656
|
- same_line
|
892
657
|
|
893
658
|
Layout/MultilineMethodParameterLineBreaks:
|
894
|
-
Description: >-
|
895
|
-
Checks that each parameter in a multi-line method definition
|
896
|
-
starts on a separate line.
|
897
659
|
Enabled: true
|
898
|
-
VersionAdded: '1.32'
|
899
660
|
AllowMultilineFinalElement: false
|
900
661
|
|
901
662
|
Layout/MultilineOperationIndentation:
|
902
|
-
Description: >-
|
903
|
-
Checks indentation of binary operations that span more than
|
904
|
-
one line.
|
905
663
|
Enabled: true
|
906
|
-
VersionAdded: '0.49'
|
907
664
|
EnforcedStyle: aligned
|
908
665
|
SupportedStyles:
|
909
666
|
- aligned
|
910
667
|
- indented
|
911
668
|
|
912
669
|
Layout/ParameterAlignment:
|
913
|
-
Description: >-
|
914
|
-
Align the parameters of a method definition if they span more
|
915
|
-
than one line.
|
916
|
-
StyleGuide: '#no-double-indent'
|
917
670
|
Enabled: true
|
918
|
-
VersionAdded: '0.49'
|
919
|
-
VersionChanged: '0.77'
|
920
671
|
# Alignment of parameters in multi-line method calls.
|
921
672
|
#
|
922
673
|
# The `with_first_parameter` style aligns the following lines along the same
|
@@ -936,95 +687,55 @@ Layout/ParameterAlignment:
|
|
936
687
|
- with_fixed_indentation
|
937
688
|
|
938
689
|
Layout/RedundantLineBreak:
|
939
|
-
Description: >-
|
940
|
-
Do not break up an expression into multiple lines when it fits
|
941
|
-
on a single line.
|
942
690
|
Enabled: false
|
943
691
|
InspectBlocks: true
|
944
|
-
VersionAdded: '1.13'
|
945
692
|
Exclude:
|
946
693
|
- '**/*.jbuilder'
|
947
694
|
- 'config/routes.rb'
|
948
695
|
|
949
696
|
Layout/RescueEnsureAlignment:
|
950
|
-
Description: 'Align rescues and ensures correctly.'
|
951
697
|
Enabled: true
|
952
|
-
VersionAdded: '0.49'
|
953
698
|
|
954
699
|
Layout/SingleLineBlockChain:
|
955
|
-
Description: 'Put method call on a separate line if chained to a single line block.'
|
956
700
|
Enabled: false
|
957
|
-
VersionAdded: '1.14'
|
958
701
|
|
959
702
|
Layout/SpaceAfterColon:
|
960
|
-
Description: 'Use spaces after colons.'
|
961
|
-
StyleGuide: '#spaces-operators'
|
962
703
|
Enabled: true
|
963
|
-
VersionAdded: '0.49'
|
964
704
|
|
965
705
|
Layout/SpaceAfterComma:
|
966
|
-
Description: 'Use spaces after commas.'
|
967
|
-
StyleGuide: '#spaces-operators'
|
968
706
|
Enabled: true
|
969
|
-
VersionAdded: '0.49'
|
970
707
|
|
971
708
|
Layout/SpaceAfterMethodName:
|
972
|
-
Description: >-
|
973
|
-
Do not put a space between a method name and the opening
|
974
|
-
parenthesis in a method definition.
|
975
|
-
StyleGuide: '#parens-no-spaces'
|
976
709
|
Enabled: true
|
977
|
-
VersionAdded: '0.49'
|
978
710
|
|
979
711
|
Layout/SpaceAfterNot:
|
980
|
-
Description: Tracks redundant space after the ! operator.
|
981
|
-
StyleGuide: '#no-space-bang'
|
982
712
|
Enabled: true
|
983
|
-
VersionAdded: '0.49'
|
984
713
|
|
985
714
|
Layout/SpaceAfterSemicolon:
|
986
|
-
Description: 'Use spaces after semicolons.'
|
987
|
-
StyleGuide: '#spaces-operators'
|
988
715
|
Enabled: true
|
989
|
-
VersionAdded: '0.49'
|
990
716
|
|
991
717
|
Layout/SpaceAroundBlockParameters:
|
992
|
-
Description: 'Checks the spacing inside and after block parameters pipes.'
|
993
718
|
Enabled: true
|
994
|
-
VersionAdded: '0.49'
|
995
719
|
EnforcedStyleInsidePipes: no_space
|
996
720
|
SupportedStylesInsidePipes:
|
997
721
|
- space
|
998
722
|
- no_space
|
999
723
|
|
1000
724
|
Layout/SpaceAroundEqualsInParameterDefault:
|
1001
|
-
Description: >-
|
1002
|
-
Checks that the equals signs in parameter default assignments
|
1003
|
-
have or don't have surrounding space depending on
|
1004
|
-
configuration.
|
1005
|
-
StyleGuide: '#spaces-around-equals'
|
1006
725
|
Enabled: true
|
1007
|
-
VersionAdded: '0.49'
|
1008
726
|
EnforcedStyle: space
|
1009
727
|
SupportedStyles:
|
1010
728
|
- space
|
1011
729
|
- no_space
|
1012
730
|
|
1013
731
|
Layout/SpaceAroundKeyword:
|
1014
|
-
Description: 'Use a space around keywords if appropriate.'
|
1015
732
|
Enabled: true
|
1016
|
-
VersionAdded: '0.49'
|
1017
733
|
|
1018
734
|
Layout/SpaceAroundMethodCallOperator:
|
1019
|
-
Description: 'Checks method call operators to not have spaces around them.'
|
1020
735
|
Enabled: true
|
1021
|
-
VersionAdded: '0.82'
|
1022
736
|
|
1023
737
|
Layout/SpaceAroundOperators:
|
1024
|
-
Description: 'Use a single space around operators.'
|
1025
|
-
StyleGuide: '#spaces-operators'
|
1026
738
|
Enabled: true
|
1027
|
-
VersionAdded: '0.49'
|
1028
739
|
# When `true`, allows most uses of extra spacing if the intent is to align
|
1029
740
|
# with an operator on the previous or next line, not counting empty lines
|
1030
741
|
# or comment lines.
|
@@ -1035,11 +746,7 @@ Layout/SpaceAroundOperators:
|
|
1035
746
|
- no_space
|
1036
747
|
|
1037
748
|
Layout/SpaceBeforeBlockBraces:
|
1038
|
-
Description: >-
|
1039
|
-
Checks that the left block brace has or doesn't have space
|
1040
|
-
before it.
|
1041
749
|
Enabled: true
|
1042
|
-
VersionAdded: '0.49'
|
1043
750
|
EnforcedStyle: space
|
1044
751
|
SupportedStyles:
|
1045
752
|
- space
|
@@ -1048,55 +755,35 @@ Layout/SpaceBeforeBlockBraces:
|
|
1048
755
|
SupportedStylesForEmptyBraces:
|
1049
756
|
- space
|
1050
757
|
- no_space
|
1051
|
-
VersionChanged: '0.52'
|
1052
758
|
|
1053
759
|
Layout/SpaceBeforeBrackets:
|
1054
|
-
Description: 'Checks for receiver with a space before the opening brackets.'
|
1055
|
-
StyleGuide: '#space-in-brackets-access'
|
1056
760
|
Enabled: true
|
1057
|
-
VersionAdded: '1.7'
|
1058
761
|
|
1059
762
|
Layout/SpaceBeforeComma:
|
1060
|
-
Description: 'No spaces before commas.'
|
1061
763
|
Enabled: true
|
1062
|
-
VersionAdded: '0.49'
|
1063
764
|
|
1064
765
|
Layout/SpaceBeforeComment:
|
1065
|
-
Description: >-
|
1066
|
-
Checks for missing space between code and a comment on the
|
1067
|
-
same line.
|
1068
766
|
Enabled: true
|
1069
|
-
VersionAdded: '0.49'
|
1070
767
|
|
1071
768
|
Layout/SpaceBeforeFirstArg:
|
1072
|
-
Description: >-
|
1073
|
-
Checks that exactly one space is used between a method name
|
1074
|
-
and the first argument for method calls without parentheses.
|
1075
769
|
Enabled: true
|
1076
|
-
VersionAdded: '0.49'
|
1077
770
|
# When `true`, allows most uses of extra spacing if the intent is to align
|
1078
771
|
# things with the previous or next line, not counting empty lines or comment
|
1079
772
|
# lines.
|
1080
773
|
AllowForAlignment: false
|
1081
774
|
|
1082
775
|
Layout/SpaceBeforeSemicolon:
|
1083
|
-
Description: 'No spaces before semicolons.'
|
1084
776
|
Enabled: true
|
1085
|
-
VersionAdded: '0.49'
|
1086
777
|
|
1087
778
|
Layout/SpaceInLambdaLiteral:
|
1088
|
-
Description: 'Checks for spaces in lambda literals.'
|
1089
779
|
Enabled: true
|
1090
|
-
VersionAdded: '0.49'
|
1091
780
|
EnforcedStyle: require_space
|
1092
781
|
SupportedStyles:
|
1093
782
|
- require_no_space
|
1094
783
|
- require_space
|
1095
784
|
|
1096
785
|
Layout/SpaceInsideArrayLiteralBrackets:
|
1097
|
-
Description: 'Checks the spacing inside array literal brackets.'
|
1098
786
|
Enabled: true
|
1099
|
-
VersionAdded: '0.52'
|
1100
787
|
EnforcedStyle: no_space
|
1101
788
|
SupportedStyles:
|
1102
789
|
- space
|
@@ -1110,17 +797,10 @@ Layout/SpaceInsideArrayLiteralBrackets:
|
|
1110
797
|
- no_space
|
1111
798
|
|
1112
799
|
Layout/SpaceInsideArrayPercentLiteral:
|
1113
|
-
Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
|
1114
800
|
Enabled: true
|
1115
|
-
VersionAdded: '0.49'
|
1116
801
|
|
1117
802
|
Layout/SpaceInsideBlockBraces:
|
1118
|
-
Description: >-
|
1119
|
-
Checks that block braces have or don't have surrounding space.
|
1120
|
-
For blocks taking parameters, checks that the left brace has
|
1121
|
-
or doesn't have trailing space.
|
1122
803
|
Enabled: true
|
1123
|
-
VersionAdded: '0.49'
|
1124
804
|
EnforcedStyle: space
|
1125
805
|
SupportedStyles:
|
1126
806
|
- space
|
@@ -1133,10 +813,7 @@ Layout/SpaceInsideBlockBraces:
|
|
1133
813
|
SpaceBeforeBlockParameters: true
|
1134
814
|
|
1135
815
|
Layout/SpaceInsideHashLiteralBraces:
|
1136
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
1137
|
-
StyleGuide: '#spaces-braces'
|
1138
816
|
Enabled: true
|
1139
|
-
VersionAdded: '0.49'
|
1140
817
|
EnforcedStyle: space
|
1141
818
|
SupportedStyles:
|
1142
819
|
- space
|
@@ -1150,11 +827,7 @@ Layout/SpaceInsideHashLiteralBraces:
|
|
1150
827
|
- no_space
|
1151
828
|
|
1152
829
|
Layout/SpaceInsideParens:
|
1153
|
-
Description: 'No spaces after ( or before ).'
|
1154
|
-
StyleGuide: '#spaces-braces'
|
1155
830
|
Enabled: true
|
1156
|
-
VersionAdded: '0.49'
|
1157
|
-
VersionChanged: '1.22'
|
1158
831
|
EnforcedStyle: no_space
|
1159
832
|
SupportedStyles:
|
1160
833
|
- space
|
@@ -1162,21 +835,13 @@ Layout/SpaceInsideParens:
|
|
1162
835
|
- no_space
|
1163
836
|
|
1164
837
|
Layout/SpaceInsidePercentLiteralDelimiters:
|
1165
|
-
Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
|
1166
838
|
Enabled: true
|
1167
|
-
VersionAdded: '0.49'
|
1168
839
|
|
1169
840
|
Layout/SpaceInsideRangeLiteral:
|
1170
|
-
Description: 'No spaces inside range literals.'
|
1171
|
-
StyleGuide: '#no-space-inside-range-literals'
|
1172
841
|
Enabled: true
|
1173
|
-
VersionAdded: '0.49'
|
1174
842
|
|
1175
843
|
Layout/SpaceInsideReferenceBrackets:
|
1176
|
-
Description: 'Checks the spacing inside referential brackets.'
|
1177
844
|
Enabled: true
|
1178
|
-
VersionAdded: '0.52'
|
1179
|
-
VersionChanged: '0.53'
|
1180
845
|
EnforcedStyle: no_space
|
1181
846
|
SupportedStyles:
|
1182
847
|
- space
|
@@ -1187,30 +852,19 @@ Layout/SpaceInsideReferenceBrackets:
|
|
1187
852
|
- no_space
|
1188
853
|
|
1189
854
|
Layout/SpaceInsideStringInterpolation:
|
1190
|
-
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
1191
|
-
StyleGuide: '#string-interpolation'
|
1192
855
|
Enabled: true
|
1193
|
-
VersionAdded: '0.49'
|
1194
856
|
EnforcedStyle: no_space
|
1195
857
|
SupportedStyles:
|
1196
858
|
- space
|
1197
859
|
- no_space
|
1198
860
|
|
1199
861
|
Layout/TrailingEmptyLines:
|
1200
|
-
Description: 'Checks trailing blank lines and final newline.'
|
1201
|
-
StyleGuide: '#newline-eof'
|
1202
862
|
Enabled: true
|
1203
|
-
VersionAdded: '0.49'
|
1204
|
-
VersionChanged: '0.77'
|
1205
863
|
EnforcedStyle: final_newline
|
1206
864
|
SupportedStyles:
|
1207
865
|
- final_newline
|
1208
866
|
- final_blank_line
|
1209
867
|
|
1210
868
|
Layout/TrailingWhitespace:
|
1211
|
-
Description: 'Avoid trailing whitespace.'
|
1212
|
-
StyleGuide: '#no-trailing-whitespace'
|
1213
869
|
Enabled: true
|
1214
|
-
VersionAdded: '0.49'
|
1215
|
-
VersionChanged: '1.0'
|
1216
870
|
AllowInHeredoc: false
|