chefstyle 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/config/chefstyle.yml +64 -47
- data/config/disable_all.yml +169 -131
- data/config/disabled.yml +29 -34
- data/config/enabled.yml +432 -307
- data/config/upstream.yml +537 -404
- data/lib/chefstyle/version.rb +2 -2
- metadata +5 -5
data/config/disabled.yml
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
# These are all the cops that are disabled in the default configuration.
|
2
2
|
|
3
|
+
Layout/FirstArrayElementLineBreak:
|
4
|
+
Description: >-
|
5
|
+
Checks for a line break before the first element in a
|
6
|
+
multi-line array.
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Layout/FirstHashElementLineBreak:
|
10
|
+
Description: >-
|
11
|
+
Checks for a line break before the first element in a
|
12
|
+
multi-line hash.
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Layout/FirstMethodArgumentLineBreak:
|
16
|
+
Description: >-
|
17
|
+
Checks for a line break before the first argument in a
|
18
|
+
multi-line method call.
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Layout/FirstMethodParameterLineBreak:
|
22
|
+
Description: >-
|
23
|
+
Checks for a line break before the first parameter in a
|
24
|
+
multi-line method parameter definition.
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Layout/MultilineAssignmentLayout:
|
28
|
+
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
29
|
+
StyleGuide: '#indent-conditional-assignment'
|
30
|
+
Enabled: false
|
31
|
+
|
3
32
|
# By default, the rails cops are not run. Override in project or home
|
4
33
|
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
5
34
|
Rails:
|
@@ -35,30 +64,6 @@ Style/Encoding:
|
|
35
64
|
StyleGuide: '#utf-8'
|
36
65
|
Enabled: false
|
37
66
|
|
38
|
-
Style/FirstArrayElementLineBreak:
|
39
|
-
Description: >-
|
40
|
-
Checks for a line break before the first element in a
|
41
|
-
multi-line array.
|
42
|
-
Enabled: false
|
43
|
-
|
44
|
-
Style/FirstHashElementLineBreak:
|
45
|
-
Description: >-
|
46
|
-
Checks for a line break before the first element in a
|
47
|
-
multi-line hash.
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Style/FirstMethodArgumentLineBreak:
|
51
|
-
Description: >-
|
52
|
-
Checks for a line break before the first argument in a
|
53
|
-
multi-line method call.
|
54
|
-
Enabled: false
|
55
|
-
|
56
|
-
Style/FirstMethodParameterLineBreak:
|
57
|
-
Description: >-
|
58
|
-
Checks for a line break before the first parameter in a
|
59
|
-
multi-line method parameter definition.
|
60
|
-
Enabled: false
|
61
|
-
|
62
67
|
Style/ImplicitRuntimeError:
|
63
68
|
Description: >-
|
64
69
|
Use `raise` or `fail` with an explicit exception class and
|
@@ -96,11 +101,6 @@ Style/MissingElse:
|
|
96
101
|
- case
|
97
102
|
- both
|
98
103
|
|
99
|
-
Style/MultilineAssignmentLayout:
|
100
|
-
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
101
|
-
StyleGuide: '#indent-conditional-assignment'
|
102
|
-
Enabled: false
|
103
|
-
|
104
104
|
Style/OptionHash:
|
105
105
|
Description: "Don't use option hashes when you can use keyword arguments."
|
106
106
|
Enabled: false
|
@@ -114,11 +114,6 @@ Style/StringMethods:
|
|
114
114
|
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
115
115
|
Enabled: false
|
116
116
|
|
117
|
-
Style/SymbolArray:
|
118
|
-
Description: 'Use %i or %I for arrays of symbols.'
|
119
|
-
StyleGuide: '#percent-i'
|
120
|
-
Enabled: false
|
121
|
-
|
122
117
|
Style/SingleLineBlockParams:
|
123
118
|
Description: 'Enforces the names of some block params.'
|
124
119
|
Enabled: false
|
data/config/enabled.yml
CHANGED
@@ -1,40 +1,355 @@
|
|
1
1
|
# These are all the cops that are enabled in the default configuration.
|
2
2
|
|
3
|
-
|
3
|
+
#################### Layout ###############################
|
4
|
+
|
5
|
+
Layout/AccessModifierIndentation:
|
4
6
|
Description: Check indentation of private/protected visibility modifiers.
|
5
7
|
StyleGuide: '#indent-public-private-protected'
|
6
8
|
Enabled: true
|
7
9
|
|
8
|
-
|
9
|
-
Description: Check the naming of accessor methods for get_/set_.
|
10
|
-
StyleGuide: '#accessor_mutator_method_names'
|
11
|
-
Enabled: true
|
12
|
-
|
13
|
-
Style/Alias:
|
14
|
-
Description: 'Use alias instead of alias_method.'
|
15
|
-
StyleGuide: '#alias-method'
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Style/AlignArray:
|
10
|
+
Layout/AlignArray:
|
19
11
|
Description: >-
|
20
12
|
Align the elements of an array literal if they span more than
|
21
13
|
one line.
|
22
14
|
StyleGuide: '#align-multiline-arrays'
|
23
15
|
Enabled: true
|
24
16
|
|
25
|
-
|
17
|
+
Layout/AlignHash:
|
26
18
|
Description: >-
|
27
19
|
Align the elements of a hash literal if they span more than
|
28
20
|
one line.
|
29
21
|
Enabled: true
|
30
22
|
|
31
|
-
|
23
|
+
Layout/AlignParameters:
|
32
24
|
Description: >-
|
33
25
|
Align the parameters of a method call if they span more
|
34
26
|
than one line.
|
35
27
|
StyleGuide: '#no-double-indent'
|
36
28
|
Enabled: true
|
37
29
|
|
30
|
+
Layout/BlockEndNewline:
|
31
|
+
Description: 'Put end statement of multiline block on its own line.'
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Layout/CaseIndentation:
|
35
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
36
|
+
StyleGuide: '#indent-when-to-case'
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Layout/ClosingParenthesisIndentation:
|
40
|
+
Description: 'Checks the indentation of hanging closing parentheses.'
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Layout/CommentIndentation:
|
44
|
+
Description: 'Indentation of comments.'
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Layout/DotPosition:
|
48
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
49
|
+
StyleGuide: '#consistent-multi-line-chains'
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Layout/ElseAlignment:
|
53
|
+
Description: 'Align elses and elsifs correctly.'
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Layout/EmptyLineBetweenDefs:
|
57
|
+
Description: 'Use empty lines between defs.'
|
58
|
+
StyleGuide: '#empty-lines-between-methods'
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Layout/EmptyLines:
|
62
|
+
Description: "Don't use several empty lines in a row."
|
63
|
+
StyleGuide: '#two-or-more-empty-lines'
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Layout/EmptyLinesAroundAccessModifier:
|
67
|
+
Description: "Keep blank lines around access modifiers."
|
68
|
+
StyleGuide: '#empty-lines-around-access-modifier'
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Layout/EmptyLinesAroundBeginBody:
|
72
|
+
Description: "Keeps track of empty lines around begin-end bodies."
|
73
|
+
StyleGuide: '#empty-lines-around-bodies'
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Layout/EmptyLinesAroundBlockBody:
|
77
|
+
Description: "Keeps track of empty lines around block bodies."
|
78
|
+
StyleGuide: '#empty-lines-around-bodies'
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/EmptyLinesAroundClassBody:
|
82
|
+
Description: "Keeps track of empty lines around class bodies."
|
83
|
+
StyleGuide: '#empty-lines-around-bodies'
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
87
|
+
Description: "Keeps track of empty lines around exception handling keywords."
|
88
|
+
StyleGuide: '#empty-lines-around-bodies'
|
89
|
+
Enabled: true
|
90
|
+
|
91
|
+
Layout/EmptyLinesAroundModuleBody:
|
92
|
+
Description: "Keeps track of empty lines around module bodies."
|
93
|
+
StyleGuide: '#empty-lines-around-bodies'
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
Layout/EmptyLinesAroundMethodBody:
|
97
|
+
Description: "Keeps track of empty lines around method bodies."
|
98
|
+
StyleGuide: '#empty-lines-around-bodies'
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Layout/EndOfLine:
|
102
|
+
Description: 'Use Unix-style line endings.'
|
103
|
+
StyleGuide: '#crlf'
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
Layout/ExtraSpacing:
|
107
|
+
Description: 'Do not use unnecessary spacing.'
|
108
|
+
Enabled: true
|
109
|
+
|
110
|
+
Layout/InitialIndentation:
|
111
|
+
Description: >-
|
112
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
113
|
+
Enabled: true
|
114
|
+
|
115
|
+
Layout/FirstParameterIndentation:
|
116
|
+
Description: 'Checks the indentation of the first parameter in a method call.'
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
Layout/IndentationConsistency:
|
120
|
+
Description: 'Keep indentation straight.'
|
121
|
+
StyleGuide: '#spaces-indentation'
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Layout/IndentationWidth:
|
125
|
+
Description: 'Use 2 spaces for indentation.'
|
126
|
+
StyleGuide: '#spaces-indentation'
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Layout/IndentArray:
|
130
|
+
Description: >-
|
131
|
+
Checks the indentation of the first element in an array
|
132
|
+
literal.
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Layout/IndentAssignment:
|
136
|
+
Description: >-
|
137
|
+
Checks the indentation of the first line of the
|
138
|
+
right-hand-side of a multi-line assignment.
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Layout/IndentHash:
|
142
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
143
|
+
Enabled: true
|
144
|
+
|
145
|
+
Layout/IndentHeredoc:
|
146
|
+
Description: 'This cops checks the indentation of the here document bodies.'
|
147
|
+
StyleGuide: '#squiggly-heredocs'
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Layout/SpaceInLambdaLiteral:
|
151
|
+
Description: 'Checks for spaces in lambda literals.'
|
152
|
+
Enabled: true
|
153
|
+
|
154
|
+
Layout/LeadingCommentSpace:
|
155
|
+
Description: 'Comments should start with a space.'
|
156
|
+
StyleGuide: '#hash-space'
|
157
|
+
Enabled: true
|
158
|
+
|
159
|
+
Layout/MultilineArrayBraceLayout:
|
160
|
+
Description: >-
|
161
|
+
Checks that the closing brace in an array literal is
|
162
|
+
either on the same line as the last array element, or
|
163
|
+
a new line.
|
164
|
+
Enabled: true
|
165
|
+
|
166
|
+
Layout/MultilineBlockLayout:
|
167
|
+
Description: 'Ensures newlines after multiline block do statements.'
|
168
|
+
Enabled: true
|
169
|
+
|
170
|
+
Layout/MultilineHashBraceLayout:
|
171
|
+
Description: >-
|
172
|
+
Checks that the closing brace in a hash literal is
|
173
|
+
either on the same line as the last hash element, or
|
174
|
+
a new line.
|
175
|
+
Enabled: true
|
176
|
+
|
177
|
+
Layout/MultilineMethodCallBraceLayout:
|
178
|
+
Description: >-
|
179
|
+
Checks that the closing brace in a method call is
|
180
|
+
either on the same line as the last method argument, or
|
181
|
+
a new line.
|
182
|
+
Enabled: true
|
183
|
+
|
184
|
+
Layout/MultilineMethodCallIndentation:
|
185
|
+
Description: >-
|
186
|
+
Checks indentation of method calls with the dot operator
|
187
|
+
that span more than one line.
|
188
|
+
Enabled: true
|
189
|
+
|
190
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
191
|
+
Description: >-
|
192
|
+
Checks that the closing brace in a method definition is
|
193
|
+
either on the same line as the last method parameter, or
|
194
|
+
a new line.
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
Layout/MultilineOperationIndentation:
|
198
|
+
Description: >-
|
199
|
+
Checks indentation of binary operations that span more than
|
200
|
+
one line.
|
201
|
+
Enabled: true
|
202
|
+
|
203
|
+
Layout/EmptyLineAfterMagicComment:
|
204
|
+
Description: 'Add an empty line after magic comments to separate them from code.'
|
205
|
+
StyleGuide: '#separate-magic-comments-from-code'
|
206
|
+
Enabled: true
|
207
|
+
|
208
|
+
Layout/RescueEnsureAlignment:
|
209
|
+
Description: 'Align rescues and ensures correctly.'
|
210
|
+
Enabled: true
|
211
|
+
|
212
|
+
Layout/SpaceBeforeFirstArg:
|
213
|
+
Description: >-
|
214
|
+
Checks that exactly one space is used between a method name
|
215
|
+
and the first argument for method calls without parentheses.
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Layout/SpaceAfterColon:
|
219
|
+
Description: 'Use spaces after colons.'
|
220
|
+
StyleGuide: '#spaces-operators'
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
Layout/SpaceAfterComma:
|
224
|
+
Description: 'Use spaces after commas.'
|
225
|
+
StyleGuide: '#spaces-operators'
|
226
|
+
Enabled: true
|
227
|
+
|
228
|
+
Layout/SpaceAfterMethodName:
|
229
|
+
Description: >-
|
230
|
+
Do not put a space between a method name and the opening
|
231
|
+
parenthesis in a method definition.
|
232
|
+
StyleGuide: '#parens-no-spaces'
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Layout/SpaceAfterNot:
|
236
|
+
Description: Tracks redundant space after the ! operator.
|
237
|
+
StyleGuide: '#no-space-bang'
|
238
|
+
Enabled: true
|
239
|
+
|
240
|
+
Layout/SpaceAfterSemicolon:
|
241
|
+
Description: 'Use spaces after semicolons.'
|
242
|
+
StyleGuide: '#spaces-operators'
|
243
|
+
Enabled: true
|
244
|
+
|
245
|
+
Layout/SpaceBeforeBlockBraces:
|
246
|
+
Description: >-
|
247
|
+
Checks that the left block brace has or doesn't have space
|
248
|
+
before it.
|
249
|
+
Enabled: true
|
250
|
+
|
251
|
+
Layout/SpaceBeforeComma:
|
252
|
+
Description: 'No spaces before commas.'
|
253
|
+
Enabled: true
|
254
|
+
|
255
|
+
Layout/SpaceBeforeComment:
|
256
|
+
Description: >-
|
257
|
+
Checks for missing space between code and a comment on the
|
258
|
+
same line.
|
259
|
+
Enabled: true
|
260
|
+
|
261
|
+
Layout/SpaceBeforeSemicolon:
|
262
|
+
Description: 'No spaces before semicolons.'
|
263
|
+
Enabled: true
|
264
|
+
|
265
|
+
Layout/SpaceInsideBlockBraces:
|
266
|
+
Description: >-
|
267
|
+
Checks that block braces have or don't have surrounding space.
|
268
|
+
For blocks taking parameters, checks that the left brace has
|
269
|
+
or doesn't have trailing space.
|
270
|
+
Enabled: true
|
271
|
+
|
272
|
+
Layout/SpaceAroundBlockParameters:
|
273
|
+
Description: 'Checks the spacing inside and after block parameters pipes.'
|
274
|
+
Enabled: true
|
275
|
+
|
276
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
277
|
+
Description: >-
|
278
|
+
Checks that the equals signs in parameter default assignments
|
279
|
+
have or don't have surrounding space depending on
|
280
|
+
configuration.
|
281
|
+
StyleGuide: '#spaces-around-equals'
|
282
|
+
Enabled: true
|
283
|
+
|
284
|
+
Layout/SpaceAroundKeyword:
|
285
|
+
Description: 'Use a space around keywords if appropriate.'
|
286
|
+
Enabled: true
|
287
|
+
|
288
|
+
Layout/SpaceAroundOperators:
|
289
|
+
Description: 'Use a single space around operators.'
|
290
|
+
StyleGuide: '#spaces-operators'
|
291
|
+
Enabled: true
|
292
|
+
|
293
|
+
Layout/SpaceInsideArrayPercentLiteral:
|
294
|
+
Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
|
295
|
+
Enabled: true
|
296
|
+
|
297
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
298
|
+
Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
|
299
|
+
Enabled: true
|
300
|
+
|
301
|
+
Layout/SpaceInsideBrackets:
|
302
|
+
Description: 'No spaces after [ or before ].'
|
303
|
+
StyleGuide: '#no-spaces-braces'
|
304
|
+
Enabled: true
|
305
|
+
|
306
|
+
Layout/SpaceInsideHashLiteralBraces:
|
307
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
308
|
+
StyleGuide: '#spaces-operators'
|
309
|
+
Enabled: true
|
310
|
+
|
311
|
+
Layout/SpaceInsideParens:
|
312
|
+
Description: 'No spaces after ( or before ).'
|
313
|
+
StyleGuide: '#no-spaces-braces'
|
314
|
+
Enabled: true
|
315
|
+
|
316
|
+
Layout/SpaceInsideRangeLiteral:
|
317
|
+
Description: 'No spaces inside range literals.'
|
318
|
+
StyleGuide: '#no-space-inside-range-literals'
|
319
|
+
Enabled: true
|
320
|
+
|
321
|
+
Layout/SpaceInsideStringInterpolation:
|
322
|
+
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
323
|
+
StyleGuide: '#string-interpolation'
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
Layout/Tab:
|
327
|
+
Description: 'No hard tabs.'
|
328
|
+
StyleGuide: '#spaces-indentation'
|
329
|
+
Enabled: true
|
330
|
+
|
331
|
+
Layout/TrailingBlankLines:
|
332
|
+
Description: 'Checks trailing blank lines and final newline.'
|
333
|
+
StyleGuide: '#newline-eof'
|
334
|
+
Enabled: true
|
335
|
+
|
336
|
+
Layout/TrailingWhitespace:
|
337
|
+
Description: 'Avoid trailing whitespace.'
|
338
|
+
StyleGuide: '#no-trailing-whitespace'
|
339
|
+
Enabled: true
|
340
|
+
|
341
|
+
#################### Style ###############################
|
342
|
+
|
343
|
+
Style/AccessorMethodName:
|
344
|
+
Description: Check the naming of accessor methods for get_/set_.
|
345
|
+
StyleGuide: '#accessor_mutator_method_names'
|
346
|
+
Enabled: true
|
347
|
+
|
348
|
+
Style/Alias:
|
349
|
+
Description: 'Use alias instead of alias_method.'
|
350
|
+
StyleGuide: '#alias-method'
|
351
|
+
Enabled: true
|
352
|
+
|
38
353
|
Style/AndOr:
|
39
354
|
Description: 'Use &&/|| instead of and/or.'
|
40
355
|
StyleGuide: '#no-and-or-or'
|
@@ -75,10 +390,6 @@ Style/BlockComments:
|
|
75
390
|
StyleGuide: '#no-block-comments'
|
76
391
|
Enabled: true
|
77
392
|
|
78
|
-
Style/BlockEndNewline:
|
79
|
-
Description: 'Put end statement of multiline block on its own line.'
|
80
|
-
Enabled: true
|
81
|
-
|
82
393
|
Style/BlockDelimiters:
|
83
394
|
Description: >-
|
84
395
|
Avoid using {...} for multi-line blocks (multiline chaining is
|
@@ -96,11 +407,6 @@ Style/CaseEquality:
|
|
96
407
|
StyleGuide: '#no-case-equality'
|
97
408
|
Enabled: true
|
98
409
|
|
99
|
-
Style/CaseIndentation:
|
100
|
-
Description: 'Indentation of when in a case/when/[else/]end.'
|
101
|
-
StyleGuide: '#indent-when-to-case'
|
102
|
-
Enabled: true
|
103
|
-
|
104
410
|
Style/CharacterLiteral:
|
105
411
|
Description: 'Checks for uses of character literals.'
|
106
412
|
StyleGuide: '#no-character-literals'
|
@@ -129,10 +435,6 @@ Style/ClassVars:
|
|
129
435
|
StyleGuide: '#no-class-vars'
|
130
436
|
Enabled: true
|
131
437
|
|
132
|
-
Style/ClosingParenthesisIndentation:
|
133
|
-
Description: 'Checks the indentation of hanging closing parentheses.'
|
134
|
-
Enabled: true
|
135
|
-
|
136
438
|
Style/ColonMethodCall:
|
137
439
|
Description: 'Do not use :: for method call.'
|
138
440
|
StyleGuide: '#double-colons'
|
@@ -147,11 +449,7 @@ Style/CommentAnnotation:
|
|
147
449
|
Description: >-
|
148
450
|
Checks formatting of special comments
|
149
451
|
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
150
|
-
StyleGuide: '#annotate-keywords'
|
151
|
-
Enabled: true
|
152
|
-
|
153
|
-
Style/CommentIndentation:
|
154
|
-
Description: 'Indentation of comments.'
|
452
|
+
StyleGuide: '#annotate-keywords'
|
155
453
|
Enabled: true
|
156
454
|
|
157
455
|
Style/ConditionalAssignment:
|
@@ -178,11 +476,6 @@ Style/Documentation:
|
|
178
476
|
- 'spec/**/*'
|
179
477
|
- 'test/**/*'
|
180
478
|
|
181
|
-
Style/DotPosition:
|
182
|
-
Description: 'Checks the position of the dot in multi-line method calls.'
|
183
|
-
StyleGuide: '#consistent-multi-line-chains'
|
184
|
-
Enabled: true
|
185
|
-
|
186
479
|
Style/DoubleNegation:
|
187
480
|
Description: 'Checks for uses of double negation (!!).'
|
188
481
|
StyleGuide: '#no-bang-bang'
|
@@ -198,10 +491,6 @@ Style/EachWithObject:
|
|
198
491
|
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
199
492
|
Enabled: true
|
200
493
|
|
201
|
-
Style/ElseAlignment:
|
202
|
-
Description: 'Align elses and elsifs correctly.'
|
203
|
-
Enabled: true
|
204
|
-
|
205
494
|
Style/EmptyElse:
|
206
495
|
Description: 'Avoid empty else-clauses.'
|
207
496
|
Enabled: true
|
@@ -210,35 +499,6 @@ Style/EmptyCaseCondition:
|
|
210
499
|
Description: 'Avoid empty condition in case statements.'
|
211
500
|
Enabled: true
|
212
501
|
|
213
|
-
Style/EmptyLineBetweenDefs:
|
214
|
-
Description: 'Use empty lines between defs.'
|
215
|
-
StyleGuide: '#empty-lines-between-methods'
|
216
|
-
Enabled: true
|
217
|
-
|
218
|
-
Style/EmptyLines:
|
219
|
-
Description: "Don't use several empty lines in a row."
|
220
|
-
Enabled: true
|
221
|
-
|
222
|
-
Style/EmptyLinesAroundAccessModifier:
|
223
|
-
Description: "Keep blank lines around access modifiers."
|
224
|
-
Enabled: true
|
225
|
-
|
226
|
-
Style/EmptyLinesAroundBlockBody:
|
227
|
-
Description: "Keeps track of empty lines around block bodies."
|
228
|
-
Enabled: true
|
229
|
-
|
230
|
-
Style/EmptyLinesAroundClassBody:
|
231
|
-
Description: "Keeps track of empty lines around class bodies."
|
232
|
-
Enabled: true
|
233
|
-
|
234
|
-
Style/EmptyLinesAroundModuleBody:
|
235
|
-
Description: "Keeps track of empty lines around module bodies."
|
236
|
-
Enabled: true
|
237
|
-
|
238
|
-
Style/EmptyLinesAroundMethodBody:
|
239
|
-
Description: "Keeps track of empty lines around method bodies."
|
240
|
-
Enabled: true
|
241
|
-
|
242
502
|
Style/EmptyLiteral:
|
243
503
|
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
244
504
|
StyleGuide: '#literal-array-hash'
|
@@ -254,20 +514,11 @@ Style/EndBlock:
|
|
254
514
|
StyleGuide: '#no-END-blocks'
|
255
515
|
Enabled: true
|
256
516
|
|
257
|
-
Style/EndOfLine:
|
258
|
-
Description: 'Use Unix-style line endings.'
|
259
|
-
StyleGuide: '#crlf'
|
260
|
-
Enabled: true
|
261
|
-
|
262
517
|
Style/EvenOdd:
|
263
518
|
Description: 'Favor the use of Integer#even? && Integer#odd?'
|
264
519
|
StyleGuide: '#predicate-methods'
|
265
520
|
Enabled: true
|
266
521
|
|
267
|
-
Style/ExtraSpacing:
|
268
|
-
Description: 'Do not use unnecessary spacing.'
|
269
|
-
Enabled: true
|
270
|
-
|
271
522
|
Style/FileName:
|
272
523
|
Description: 'Use snake_case for source file names.'
|
273
524
|
StyleGuide: '#snake-case-files'
|
@@ -279,15 +530,6 @@ Style/FrozenStringLiteralComment:
|
|
279
530
|
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
280
531
|
Enabled: true
|
281
532
|
|
282
|
-
Style/InitialIndentation:
|
283
|
-
Description: >-
|
284
|
-
Checks the indentation of the first non-blank non-comment line in a file.
|
285
|
-
Enabled: true
|
286
|
-
|
287
|
-
Style/FirstParameterIndentation:
|
288
|
-
Description: 'Checks the indentation of the first parameter in a method call.'
|
289
|
-
Enabled: true
|
290
|
-
|
291
533
|
Style/FlipFlop:
|
292
534
|
Description: 'Checks for flip flops'
|
293
535
|
StyleGuide: '#no-flip-flops'
|
@@ -303,6 +545,10 @@ Style/FormatString:
|
|
303
545
|
StyleGuide: '#sprintf'
|
304
546
|
Enabled: true
|
305
547
|
|
548
|
+
Style/FormatStringToken:
|
549
|
+
Description: 'Use a consistent style for format string tokens.'
|
550
|
+
Enabled: true
|
551
|
+
|
306
552
|
Style/GlobalVars:
|
307
553
|
Description: 'Do not introduce global variables.'
|
308
554
|
StyleGuide: '#instance-vars'
|
@@ -342,15 +588,6 @@ Style/IfWithSemicolon:
|
|
342
588
|
StyleGuide: '#no-semicolon-ifs'
|
343
589
|
Enabled: true
|
344
590
|
|
345
|
-
Style/IndentationConsistency:
|
346
|
-
Description: 'Keep indentation straight.'
|
347
|
-
Enabled: true
|
348
|
-
|
349
|
-
Style/IndentationWidth:
|
350
|
-
Description: 'Use 2 spaces for indentation.'
|
351
|
-
StyleGuide: '#spaces-indentation'
|
352
|
-
Enabled: true
|
353
|
-
|
354
591
|
Style/IdenticalConditionalBranches:
|
355
592
|
Description: >-
|
356
593
|
Checks that conditional statements do not have an identical
|
@@ -358,46 +595,27 @@ Style/IdenticalConditionalBranches:
|
|
358
595
|
out of the conditional.
|
359
596
|
Enabled: true
|
360
597
|
|
361
|
-
Style/IndentArray:
|
362
|
-
Description: >-
|
363
|
-
Checks the indentation of the first element in an array
|
364
|
-
literal.
|
365
|
-
Enabled: true
|
366
|
-
|
367
|
-
Style/IndentAssignment:
|
368
|
-
Description: >-
|
369
|
-
Checks the indentation of the first line of the
|
370
|
-
right-hand-side of a multi-line assignment.
|
371
|
-
Enabled: true
|
372
|
-
|
373
|
-
Style/IndentHash:
|
374
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
375
|
-
Enabled: true
|
376
|
-
|
377
598
|
Style/InfiniteLoop:
|
378
599
|
Description: 'Use Kernel#loop for infinite loops.'
|
379
600
|
StyleGuide: '#infinite-loop'
|
380
601
|
Enabled: true
|
381
602
|
|
603
|
+
Style/InverseMethods:
|
604
|
+
Description: >-
|
605
|
+
Use the inverse method instead of `!.method`
|
606
|
+
if an inverse method is defined.
|
607
|
+
Enabled: true
|
608
|
+
|
382
609
|
Style/Lambda:
|
383
610
|
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
384
611
|
StyleGuide: '#lambda-multi-line'
|
385
612
|
Enabled: true
|
386
613
|
|
387
|
-
Style/SpaceInLambdaLiteral:
|
388
|
-
Description: 'Checks for spaces in lambda literals.'
|
389
|
-
Enabled: true
|
390
|
-
|
391
614
|
Style/LambdaCall:
|
392
615
|
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
393
616
|
StyleGuide: '#proc-call'
|
394
617
|
Enabled: true
|
395
618
|
|
396
|
-
Style/LeadingCommentSpace:
|
397
|
-
Description: 'Comments should start with a space.'
|
398
|
-
StyleGuide: '#hash-space'
|
399
|
-
Enabled: true
|
400
|
-
|
401
619
|
Style/LineEndConcatenation:
|
402
620
|
Description: >-
|
403
621
|
Use \ instead of + or << to concatenate two string literals at
|
@@ -426,34 +644,21 @@ Style/MethodMissing:
|
|
426
644
|
StyleGuide: '#no-method-missing'
|
427
645
|
Enabled: true
|
428
646
|
|
647
|
+
Style/MixinGrouping:
|
648
|
+
Description: 'Checks for grouping of mixins in `class` and `module` bodies.'
|
649
|
+
StyleGuide: '#mixin-grouping'
|
650
|
+
Enabled: true
|
651
|
+
|
429
652
|
Style/ModuleFunction:
|
430
653
|
Description: 'Checks for usage of `extend self` in modules.'
|
431
654
|
StyleGuide: '#module-function'
|
432
655
|
Enabled: true
|
433
656
|
|
434
|
-
Style/MultilineArrayBraceLayout:
|
435
|
-
Description: >-
|
436
|
-
Checks that the closing brace in an array literal is
|
437
|
-
either on the same line as the last array element, or
|
438
|
-
a new line.
|
439
|
-
Enabled: true
|
440
|
-
|
441
657
|
Style/MultilineBlockChain:
|
442
658
|
Description: 'Avoid multi-line chains of blocks.'
|
443
659
|
StyleGuide: '#single-line-blocks'
|
444
660
|
Enabled: true
|
445
661
|
|
446
|
-
Style/MultilineBlockLayout:
|
447
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
448
|
-
Enabled: true
|
449
|
-
|
450
|
-
Style/MultilineHashBraceLayout:
|
451
|
-
Description: >-
|
452
|
-
Checks that the closing brace in a hash literal is
|
453
|
-
either on the same line as the last hash element, or
|
454
|
-
a new line.
|
455
|
-
Enabled: true
|
456
|
-
|
457
662
|
Style/MultilineIfThen:
|
458
663
|
Description: 'Do not use then for multi-line if/unless.'
|
459
664
|
StyleGuide: '#no-then'
|
@@ -468,32 +673,6 @@ Style/MultilineMemoization:
|
|
468
673
|
Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
|
469
674
|
Enabled: true
|
470
675
|
|
471
|
-
Style/MultilineMethodCallBraceLayout:
|
472
|
-
Description: >-
|
473
|
-
Checks that the closing brace in a method call is
|
474
|
-
either on the same line as the last method argument, or
|
475
|
-
a new line.
|
476
|
-
Enabled: true
|
477
|
-
|
478
|
-
Style/MultilineMethodCallIndentation:
|
479
|
-
Description: >-
|
480
|
-
Checks indentation of method calls with the dot operator
|
481
|
-
that span more than one line.
|
482
|
-
Enabled: true
|
483
|
-
|
484
|
-
Style/MultilineMethodDefinitionBraceLayout:
|
485
|
-
Description: >-
|
486
|
-
Checks that the closing brace in a method definition is
|
487
|
-
either on the same line as the last method parameter, or
|
488
|
-
a new line.
|
489
|
-
Enabled: true
|
490
|
-
|
491
|
-
Style/MultilineOperationIndentation:
|
492
|
-
Description: >-
|
493
|
-
Checks indentation of binary operations that span more than
|
494
|
-
one line.
|
495
|
-
Enabled: true
|
496
|
-
|
497
676
|
Style/MultilineTernaryOperator:
|
498
677
|
Description: >-
|
499
678
|
Avoid multi-line ?: (the ternary operator);
|
@@ -501,6 +680,12 @@ Style/MultilineTernaryOperator:
|
|
501
680
|
StyleGuide: '#no-multiline-ternary'
|
502
681
|
Enabled: true
|
503
682
|
|
683
|
+
Style/MultipleComparison:
|
684
|
+
Description: >-
|
685
|
+
Avoid comparing a variable with multiple items in a conditional,
|
686
|
+
use Array#include? instead.
|
687
|
+
Enabled: true
|
688
|
+
|
504
689
|
Style/MutableConstant:
|
505
690
|
Description: 'Do not assign mutable objects to constants.'
|
506
691
|
Enabled: true
|
@@ -677,10 +862,6 @@ Style/RegexpLiteral:
|
|
677
862
|
StyleGuide: '#percent-r'
|
678
863
|
Enabled: true
|
679
864
|
|
680
|
-
Style/RescueEnsureAlignment:
|
681
|
-
Description: 'Align rescues and ensures correctly.'
|
682
|
-
Enabled: true
|
683
|
-
|
684
865
|
Style/RescueModifier:
|
685
866
|
Description: 'Avoid using rescue in its modifier form.'
|
686
867
|
StyleGuide: '#no-rescue-modifiers'
|
@@ -715,120 +896,6 @@ Style/SingleLineMethods:
|
|
715
896
|
StyleGuide: '#no-single-line-methods'
|
716
897
|
Enabled: true
|
717
898
|
|
718
|
-
Style/SpaceBeforeFirstArg:
|
719
|
-
Description: >-
|
720
|
-
Checks that exactly one space is used between a method name
|
721
|
-
and the first argument for method calls without parentheses.
|
722
|
-
Enabled: true
|
723
|
-
|
724
|
-
Style/SpaceAfterColon:
|
725
|
-
Description: 'Use spaces after colons.'
|
726
|
-
StyleGuide: '#spaces-operators'
|
727
|
-
Enabled: true
|
728
|
-
|
729
|
-
Style/SpaceAfterComma:
|
730
|
-
Description: 'Use spaces after commas.'
|
731
|
-
StyleGuide: '#spaces-operators'
|
732
|
-
Enabled: true
|
733
|
-
|
734
|
-
Style/SpaceAfterMethodName:
|
735
|
-
Description: >-
|
736
|
-
Do not put a space between a method name and the opening
|
737
|
-
parenthesis in a method definition.
|
738
|
-
StyleGuide: '#parens-no-spaces'
|
739
|
-
Enabled: true
|
740
|
-
|
741
|
-
Style/SpaceAfterNot:
|
742
|
-
Description: Tracks redundant space after the ! operator.
|
743
|
-
StyleGuide: '#no-space-bang'
|
744
|
-
Enabled: true
|
745
|
-
|
746
|
-
Style/SpaceAfterSemicolon:
|
747
|
-
Description: 'Use spaces after semicolons.'
|
748
|
-
StyleGuide: '#spaces-operators'
|
749
|
-
Enabled: true
|
750
|
-
|
751
|
-
Style/SpaceBeforeBlockBraces:
|
752
|
-
Description: >-
|
753
|
-
Checks that the left block brace has or doesn't have space
|
754
|
-
before it.
|
755
|
-
Enabled: true
|
756
|
-
|
757
|
-
Style/SpaceBeforeComma:
|
758
|
-
Description: 'No spaces before commas.'
|
759
|
-
Enabled: true
|
760
|
-
|
761
|
-
Style/SpaceBeforeComment:
|
762
|
-
Description: >-
|
763
|
-
Checks for missing space between code and a comment on the
|
764
|
-
same line.
|
765
|
-
Enabled: true
|
766
|
-
|
767
|
-
Style/SpaceBeforeSemicolon:
|
768
|
-
Description: 'No spaces before semicolons.'
|
769
|
-
Enabled: true
|
770
|
-
|
771
|
-
Style/SpaceInsideBlockBraces:
|
772
|
-
Description: >-
|
773
|
-
Checks that block braces have or don't have surrounding space.
|
774
|
-
For blocks taking parameters, checks that the left brace has
|
775
|
-
or doesn't have trailing space.
|
776
|
-
Enabled: true
|
777
|
-
|
778
|
-
Style/SpaceAroundBlockParameters:
|
779
|
-
Description: 'Checks the spacing inside and after block parameters pipes.'
|
780
|
-
Enabled: true
|
781
|
-
|
782
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
783
|
-
Description: >-
|
784
|
-
Checks that the equals signs in parameter default assignments
|
785
|
-
have or don't have surrounding space depending on
|
786
|
-
configuration.
|
787
|
-
StyleGuide: '#spaces-around-equals'
|
788
|
-
Enabled: true
|
789
|
-
|
790
|
-
Style/SpaceAroundKeyword:
|
791
|
-
Description: 'Use a space around keywords if appropriate.'
|
792
|
-
Enabled: true
|
793
|
-
|
794
|
-
Style/SpaceAroundOperators:
|
795
|
-
Description: 'Use a single space around operators.'
|
796
|
-
StyleGuide: '#spaces-operators'
|
797
|
-
Enabled: true
|
798
|
-
|
799
|
-
Style/SpaceInsideArrayPercentLiteral:
|
800
|
-
Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
|
801
|
-
Enabled: true
|
802
|
-
|
803
|
-
Style/SpaceInsidePercentLiteralDelimiters:
|
804
|
-
Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
|
805
|
-
Enabled: true
|
806
|
-
|
807
|
-
Style/SpaceInsideBrackets:
|
808
|
-
Description: 'No spaces after [ or before ].'
|
809
|
-
StyleGuide: '#no-spaces-braces'
|
810
|
-
Enabled: true
|
811
|
-
|
812
|
-
Style/SpaceInsideHashLiteralBraces:
|
813
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
814
|
-
StyleGuide: '#spaces-operators'
|
815
|
-
Enabled: true
|
816
|
-
|
817
|
-
Style/SpaceInsideParens:
|
818
|
-
Description: 'No spaces after ( or before ).'
|
819
|
-
StyleGuide: '#no-spaces-braces'
|
820
|
-
Enabled: true
|
821
|
-
|
822
|
-
Style/SpaceInsideRangeLiteral:
|
823
|
-
Description: 'No spaces inside range literals.'
|
824
|
-
StyleGuide: '#no-space-inside-range-literals'
|
825
|
-
Enabled: true
|
826
|
-
|
827
|
-
Style/SpaceInsideStringInterpolation:
|
828
|
-
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
829
|
-
StyleGuide: '#string-interpolation'
|
830
|
-
Enabled: true
|
831
|
-
|
832
899
|
Style/SpecialGlobalVars:
|
833
900
|
Description: 'Avoid Perl-style global variables.'
|
834
901
|
StyleGuide: '#no-cryptic-perlisms'
|
@@ -855,6 +922,11 @@ Style/StructInheritance:
|
|
855
922
|
StyleGuide: '#no-extend-struct-new'
|
856
923
|
Enabled: true
|
857
924
|
|
925
|
+
Style/SymbolArray:
|
926
|
+
Description: 'Use %i or %I for arrays of symbols.'
|
927
|
+
StyleGuide: '#percent-i'
|
928
|
+
Enabled: true
|
929
|
+
|
858
930
|
Style/SymbolLiteral:
|
859
931
|
Description: 'Use plain symbols instead of string symbols when possible.'
|
860
932
|
Enabled: true
|
@@ -863,20 +935,10 @@ Style/SymbolProc:
|
|
863
935
|
Description: 'Use symbols as procs instead of blocks when possible.'
|
864
936
|
Enabled: true
|
865
937
|
|
866
|
-
Style/Tab:
|
867
|
-
Description: 'No hard tabs.'
|
868
|
-
StyleGuide: '#spaces-indentation'
|
869
|
-
Enabled: true
|
870
|
-
|
871
938
|
Style/TernaryParentheses:
|
872
939
|
Description: 'Checks for use of parentheses around ternary conditions.'
|
873
940
|
Enabled: true
|
874
941
|
|
875
|
-
Style/TrailingBlankLines:
|
876
|
-
Description: 'Checks trailing blank lines and final newline.'
|
877
|
-
StyleGuide: '#newline-eof'
|
878
|
-
Enabled: true
|
879
|
-
|
880
942
|
Style/TrailingCommaInArguments:
|
881
943
|
Description: 'Checks for trailing comma in argument lists.'
|
882
944
|
StyleGuide: '#no-trailing-params-comma'
|
@@ -887,11 +949,6 @@ Style/TrailingCommaInLiteral:
|
|
887
949
|
StyleGuide: '#no-trailing-array-commas'
|
888
950
|
Enabled: true
|
889
951
|
|
890
|
-
Style/TrailingWhitespace:
|
891
|
-
Description: 'Avoid trailing whitespace.'
|
892
|
-
StyleGuide: '#no-trailing-whitespace'
|
893
|
-
Enabled: true
|
894
|
-
|
895
952
|
Style/TrivialAccessors:
|
896
953
|
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
897
954
|
StyleGuide: '#attr_family'
|
@@ -962,11 +1019,16 @@ Style/WordArray:
|
|
962
1019
|
StyleGuide: '#percent-w'
|
963
1020
|
Enabled: true
|
964
1021
|
|
1022
|
+
Style/YodaCondition:
|
1023
|
+
Description: 'Do not use literals as the first operand of a comparison.'
|
1024
|
+
Reference: 'https://en.wikipedia.org/wiki/Yoda_conditions'
|
1025
|
+
Enabled: true
|
1026
|
+
|
965
1027
|
Style/ZeroLengthPredicate:
|
966
1028
|
Description: 'Use #empty? when testing for objects of length 0.'
|
967
1029
|
Enabled: true
|
968
1030
|
|
969
|
-
#################### Metrics
|
1031
|
+
#################### Metrics ###############################
|
970
1032
|
|
971
1033
|
Metrics/AbcSize:
|
972
1034
|
Description: >-
|
@@ -1019,9 +1081,16 @@ Metrics/PerceivedComplexity:
|
|
1019
1081
|
human reader.
|
1020
1082
|
Enabled: true
|
1021
1083
|
|
1022
|
-
#################### Lint
|
1084
|
+
#################### Lint ##################################
|
1023
1085
|
### Warnings
|
1024
1086
|
|
1087
|
+
Lint/AmbiguousBlockAssociation:
|
1088
|
+
Description: >-
|
1089
|
+
Checks for ambiguous block association with method when param passed without
|
1090
|
+
parentheses.
|
1091
|
+
StyleGuide: '#syntax'
|
1092
|
+
Enabled: true
|
1093
|
+
|
1025
1094
|
Lint/AmbiguousOperator:
|
1026
1095
|
Description: >-
|
1027
1096
|
Checks for ambiguous operators in the first argument of a
|
@@ -1090,6 +1159,7 @@ Lint/ElseLayout:
|
|
1090
1159
|
Lint/EmptyEnsure:
|
1091
1160
|
Description: 'Checks for empty ensure block.'
|
1092
1161
|
Enabled: true
|
1162
|
+
AutoCorrect: false
|
1093
1163
|
|
1094
1164
|
Lint/EmptyExpression:
|
1095
1165
|
Description: 'Checks for empty expressions.'
|
@@ -1221,10 +1291,18 @@ Lint/RescueException:
|
|
1221
1291
|
StyleGuide: '#no-blind-rescues'
|
1222
1292
|
Enabled: true
|
1223
1293
|
|
1294
|
+
Lint/RescueType:
|
1295
|
+
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
|
1296
|
+
Enabled: true
|
1297
|
+
|
1224
1298
|
Lint/SafeNavigationChain:
|
1225
1299
|
Description: 'Do not chain ordinary method call after safe navigation operator.'
|
1226
1300
|
Enabled: true
|
1227
1301
|
|
1302
|
+
Lint/ScriptPermission:
|
1303
|
+
Description: 'Grant script file execute permission.'
|
1304
|
+
Enabled: true
|
1305
|
+
|
1228
1306
|
Lint/ShadowedException:
|
1229
1307
|
Description: >-
|
1230
1308
|
Avoid rescuing a higher level exception
|
@@ -1302,7 +1380,12 @@ Lint/Void:
|
|
1302
1380
|
Description: 'Possible use of operator/literal/variable in void context.'
|
1303
1381
|
Enabled: true
|
1304
1382
|
|
1305
|
-
|
1383
|
+
#################### Performance ###########################
|
1384
|
+
|
1385
|
+
Performance/Caller:
|
1386
|
+
Description: >-
|
1387
|
+
Use `caller(n..n)` instead of `caller`.
|
1388
|
+
Enabled: true
|
1306
1389
|
|
1307
1390
|
Performance/Casecmp:
|
1308
1391
|
Description: >-
|
@@ -1410,7 +1493,9 @@ Performance/RedundantSortBy:
|
|
1410
1493
|
Enabled: true
|
1411
1494
|
|
1412
1495
|
Performance/RegexpMatch:
|
1413
|
-
Description:
|
1496
|
+
Description: >-
|
1497
|
+
Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`,
|
1498
|
+
`Regexp#===`, or `=~` when `MatchData` is not used.
|
1414
1499
|
Enabled: true
|
1415
1500
|
|
1416
1501
|
Performance/ReverseEach:
|
@@ -1457,12 +1542,37 @@ Performance/TimesMap:
|
|
1457
1542
|
Description: 'Checks for .times.map calls.'
|
1458
1543
|
Enabled: true
|
1459
1544
|
|
1460
|
-
|
1545
|
+
#################### Rails #################################
|
1461
1546
|
|
1462
1547
|
Rails/ActionFilter:
|
1463
1548
|
Description: 'Enforces consistent use of action filter methods.'
|
1464
1549
|
Enabled: true
|
1465
1550
|
|
1551
|
+
Rails/ApplicationJob:
|
1552
|
+
Description: 'Check that jobs subclass ApplicationJob.'
|
1553
|
+
Enabled: true
|
1554
|
+
|
1555
|
+
Rails/ApplicationRecord:
|
1556
|
+
Description: 'Check that models subclass ApplicationRecord.'
|
1557
|
+
Enabled: true
|
1558
|
+
|
1559
|
+
Rails/ActiveSupportAliases:
|
1560
|
+
Description: >-
|
1561
|
+
Avoid ActiveSupport aliases of standard ruby methods:
|
1562
|
+
`String#starts_with?`, `String#ends_with?`,
|
1563
|
+
`Array#append`, `Array#prepend`.
|
1564
|
+
Enabled: true
|
1565
|
+
|
1566
|
+
Rails/Blank:
|
1567
|
+
Description: 'Enforce using `blank?` and `present?`.'
|
1568
|
+
Enabled: true
|
1569
|
+
# Convert checks for `nil` or `empty?` to `blank?`
|
1570
|
+
NilOrEmpty: true
|
1571
|
+
# Convert usages of not `present?` to `blank?`
|
1572
|
+
NotPresent: true
|
1573
|
+
# Convert usages of `unless` `present?` to `if` `blank?`
|
1574
|
+
UnlessPresent: true
|
1575
|
+
|
1466
1576
|
Rails/Date:
|
1467
1577
|
Description: >-
|
1468
1578
|
Checks the correct usage of date aware methods,
|
@@ -1535,6 +1645,16 @@ Rails/PluralizationGrammar:
|
|
1535
1645
|
Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
|
1536
1646
|
Enabled: true
|
1537
1647
|
|
1648
|
+
Rails/Present:
|
1649
|
+
Description: 'Enforce using `blank?` and `present?`.'
|
1650
|
+
Enabled: true
|
1651
|
+
NotNilAndNotEmpty: true
|
1652
|
+
# Convert checks for not `nil` and not `empty?` to `present?`
|
1653
|
+
NotBlank: true
|
1654
|
+
# Convert usages of not `blank?` to `present?`
|
1655
|
+
UnlessBlank: true
|
1656
|
+
# Convert usages of `unless` `blank?` to `if` `present?`
|
1657
|
+
|
1538
1658
|
Rails/ReadWriteAttribute:
|
1539
1659
|
Description: >-
|
1540
1660
|
Checks for read_attribute(:attr) and
|
@@ -1542,6 +1662,10 @@ Rails/ReadWriteAttribute:
|
|
1542
1662
|
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#read-attribute'
|
1543
1663
|
Enabled: true
|
1544
1664
|
|
1665
|
+
Rails/RelativeDateConstant:
|
1666
|
+
Description: 'Do not assign relative date to constants.'
|
1667
|
+
Enabled: true
|
1668
|
+
|
1545
1669
|
Rails/RequestReferer:
|
1546
1670
|
Description: 'Use consistent syntax for request.referer.'
|
1547
1671
|
Enabled: true
|
@@ -1581,6 +1705,8 @@ Rails/Validation:
|
|
1581
1705
|
Description: 'Use validates :attribute, hash of validations.'
|
1582
1706
|
Enabled: true
|
1583
1707
|
|
1708
|
+
#################### Security ##############################
|
1709
|
+
|
1584
1710
|
Security/Eval:
|
1585
1711
|
Description: 'The use of eval represents a serious security risk.'
|
1586
1712
|
Enabled: true
|
@@ -1609,7 +1735,7 @@ Security/YAMLLoad:
|
|
1609
1735
|
Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
|
1610
1736
|
Enabled: true
|
1611
1737
|
|
1612
|
-
|
1738
|
+
#################### Bundler ###############################
|
1613
1739
|
|
1614
1740
|
Bundler/DuplicatedGem:
|
1615
1741
|
Description: 'Checks for duplicate gem entries in Gemfile.'
|
@@ -1620,8 +1746,7 @@ Bundler/DuplicatedGem:
|
|
1620
1746
|
|
1621
1747
|
Bundler/OrderedGems:
|
1622
1748
|
Description: >-
|
1623
|
-
|
1624
|
-
of lines in the Gemfile
|
1749
|
+
Gems within groups in the Gemfile should be alphabetically sorted.
|
1625
1750
|
Enabled: true
|
1626
1751
|
Include:
|
1627
1752
|
- '**/Gemfile'
|