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