vim-tags 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +1735 -0
- data/Gemfile +10 -0
- data/Rakefile +4 -0
- data/plugins.rb +38 -0
- data/vim-tags.gemspec +21 -0
- metadata +62 -0
data/.rubocop.yml
ADDED
@@ -0,0 +1,1735 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-minitest
|
3
|
+
- rubocop-performance
|
4
|
+
- rubocop-rails
|
5
|
+
AllCops:
|
6
|
+
NewCops: enable
|
7
|
+
Exclude:
|
8
|
+
- vendor/**/*
|
9
|
+
- Gemfile.lock
|
10
|
+
- db/schema.rb
|
11
|
+
- node_modules/**/*
|
12
|
+
- tmp/**/*
|
13
|
+
- test/dummy/db/schema.rb
|
14
|
+
- gemfiles/**/*
|
15
|
+
- bin/**/*
|
16
|
+
TargetRubyVersion: 2.7
|
17
|
+
|
18
|
+
# Department Bundler
|
19
|
+
Bundler/DuplicatedGem:
|
20
|
+
Description: Checks for duplicate gem entries in Gemfile.
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Bundler/InsecureProtocolSource:
|
24
|
+
Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Bundler/OrderedGems:
|
28
|
+
Description: Gems within groups in the Gemfile should be alphabetically sorted.
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# Department Gemspec
|
32
|
+
Gemspec/OrderedDependencies:
|
33
|
+
Description: Dependencies in the gemspec should be alphabetically sorted.
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
# Department Layout
|
37
|
+
Layout/AccessModifierIndentation:
|
38
|
+
Description: Check indentation of private/protected visibility modifiers.
|
39
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Layout/ArrayAlignment:
|
43
|
+
Description: Align the elements of an array literal if they span more than one line.
|
44
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Layout/HashAlignment:
|
48
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
49
|
+
Enabled: true
|
50
|
+
|
51
|
+
Layout/ParameterAlignment:
|
52
|
+
Description: Align the parameters of a method call if they span more than one line.
|
53
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Layout/BlockEndNewline:
|
57
|
+
Description: Put end statement of multiline block on its own line.
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Layout/CaseIndentation:
|
61
|
+
Description: Indentation of when in a case/when/[else/]end.
|
62
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Layout/ClosingParenthesisIndentation:
|
66
|
+
Description: Checks the indentation of hanging closing parentheses.
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Layout/CommentIndentation:
|
70
|
+
Description: Indentation of comments.
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Layout/DotPosition:
|
74
|
+
Description: Checks the position of the dot in multi-line method calls.
|
75
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
76
|
+
Enabled: true
|
77
|
+
EnforcedStyle: trailing
|
78
|
+
|
79
|
+
Layout/ElseAlignment:
|
80
|
+
Description: Align elses and elsifs correctly.
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Layout/EmptyLineBetweenDefs:
|
84
|
+
Description: Use empty lines between defs.
|
85
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
Layout/EmptyLines:
|
89
|
+
Description: Don't use several empty lines in a row.
|
90
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Layout/EmptyLinesAroundAccessModifier:
|
94
|
+
Description: Keep blank lines around access modifiers.
|
95
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-access-modifier
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Layout/EmptyLinesAroundBeginBody:
|
99
|
+
Description: Keeps track of empty lines around begin-end bodies.
|
100
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Layout/EmptyLinesAroundBlockBody:
|
104
|
+
Description: Keeps track of empty lines around block bodies.
|
105
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
Layout/EmptyLinesAroundClassBody:
|
109
|
+
Description: Keeps track of empty lines around class bodies.
|
110
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
111
|
+
Enabled: false
|
112
|
+
|
113
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
114
|
+
Description: Keeps track of empty lines around exception handling keywords.
|
115
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
116
|
+
Enabled: false
|
117
|
+
|
118
|
+
Layout/EmptyLinesAroundModuleBody:
|
119
|
+
Description: Keeps track of empty lines around module bodies.
|
120
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
Layout/EmptyLinesAroundMethodBody:
|
124
|
+
Description: Keeps track of empty lines around method bodies.
|
125
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
126
|
+
Enabled: false
|
127
|
+
|
128
|
+
Layout/EndOfLine:
|
129
|
+
Description: Use Unix-style line endings.
|
130
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
131
|
+
Enabled: false
|
132
|
+
|
133
|
+
Layout/ExtraSpacing:
|
134
|
+
Description: Do not use unnecessary spacing.
|
135
|
+
Enabled: true
|
136
|
+
|
137
|
+
Layout/FirstArrayElementLineBreak:
|
138
|
+
Description: Checks for a line break before the first element in a multi-line array.
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
Layout/FirstHashElementLineBreak:
|
142
|
+
Description: Checks for a line break before the first element in a multi-line hash.
|
143
|
+
Enabled: false
|
144
|
+
|
145
|
+
Layout/FirstMethodArgumentLineBreak:
|
146
|
+
Description: Checks for a line break before the first argument in a multi-line method call.
|
147
|
+
Enabled: false
|
148
|
+
|
149
|
+
Layout/FirstMethodParameterLineBreak:
|
150
|
+
Description: Checks for a line break before the first parameter in a multi-line method parameter definition.
|
151
|
+
Enabled: false
|
152
|
+
|
153
|
+
Layout/InitialIndentation:
|
154
|
+
Description: Checks the indentation of the first non-blank non-comment line in a file.
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Layout/FirstArgumentIndentation:
|
158
|
+
Description: Checks the indentation of the first parameter in a method call.
|
159
|
+
Enabled: false
|
160
|
+
|
161
|
+
Layout/IndentationConsistency:
|
162
|
+
Description: Keep indentation straight.
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
164
|
+
Enabled: false
|
165
|
+
|
166
|
+
Layout/IndentationWidth:
|
167
|
+
Description: Use 2 spaces for indentation.
|
168
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
Layout/FirstArrayElementIndentation:
|
172
|
+
Description: Checks the indentation of the first element in an array literal.
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
Layout/AssignmentIndentation:
|
176
|
+
Description: Checks the indentation of the first line of the right-hand-side of a multi-line assignment.
|
177
|
+
Enabled: true
|
178
|
+
|
179
|
+
Layout/FirstHashElementIndentation:
|
180
|
+
Description: Checks the indentation of the first key in a hash literal.
|
181
|
+
Enabled: false
|
182
|
+
|
183
|
+
Layout/HeredocIndentation:
|
184
|
+
Description: This cops checks the indentation of the here document bodies.
|
185
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#squiggly-heredocs
|
186
|
+
Enabled: true
|
187
|
+
|
188
|
+
Layout/SpaceInLambdaLiteral:
|
189
|
+
Description: Checks for spaces in lambda literals.
|
190
|
+
Enabled: true
|
191
|
+
|
192
|
+
Layout/LeadingCommentSpace:
|
193
|
+
Description: Comments should start with a space.
|
194
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
Layout/MultilineArrayBraceLayout:
|
198
|
+
Description: Checks that the closing brace in an array literal is either on the same line as the last array element, or a new line.
|
199
|
+
Enabled: true
|
200
|
+
|
201
|
+
Layout/MultilineAssignmentLayout:
|
202
|
+
Description: Check for a newline after the assignment operator in multi-line assignments.
|
203
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guid#indent-conditional-assignment
|
204
|
+
Enabled: false
|
205
|
+
|
206
|
+
Layout/MultilineBlockLayout:
|
207
|
+
Description: Ensures newlines after multiline block do statements.
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
Layout/MultilineHashBraceLayout:
|
211
|
+
Description: Checks that the closing brace in a hash literal is either on the same line as the last hash element, or a new line.
|
212
|
+
Enabled: true
|
213
|
+
|
214
|
+
Layout/MultilineMethodCallBraceLayout:
|
215
|
+
Description: Checks that the closing brace in a method call is either on the same line as the last method argument, or a new line.
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Layout/MultilineMethodCallIndentation:
|
219
|
+
Description: Checks indentation of method calls with the dot operator that span more than one line.
|
220
|
+
Enabled: true
|
221
|
+
|
222
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
223
|
+
Description: Checks that the closing brace in a method definition is either on the same line as the last method parameter, or a new line.
|
224
|
+
Enabled: true
|
225
|
+
|
226
|
+
Layout/MultilineOperationIndentation:
|
227
|
+
Description: Checks indentation of binary operations that span more than one line.
|
228
|
+
Enabled: false
|
229
|
+
|
230
|
+
Layout/EmptyLineAfterMagicComment:
|
231
|
+
Description: Add an empty line after magic comments to separate them from code.
|
232
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Layout/RescueEnsureAlignment:
|
236
|
+
Description: Align rescues and ensures correctly.
|
237
|
+
Enabled: false
|
238
|
+
|
239
|
+
Layout/SpaceBeforeFirstArg:
|
240
|
+
Description: Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
|
241
|
+
Enabled: true
|
242
|
+
|
243
|
+
Layout/SpaceAfterColon:
|
244
|
+
Description: Use spaces after colons.
|
245
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
246
|
+
Enabled: true
|
247
|
+
|
248
|
+
Layout/SpaceAfterComma:
|
249
|
+
Description: Use spaces after commas.
|
250
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Layout/SpaceAfterMethodName:
|
254
|
+
Description: Do not put a space between a method name and the opening parenthesis in a method definition.
|
255
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
256
|
+
Enabled: true
|
257
|
+
|
258
|
+
Layout/SpaceAfterNot:
|
259
|
+
Description: Tracks redundant space after the ! operator.
|
260
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
261
|
+
Enabled: false
|
262
|
+
|
263
|
+
Layout/SpaceAfterSemicolon:
|
264
|
+
Description: Use spaces after semicolons.
|
265
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
266
|
+
Enabled: true
|
267
|
+
|
268
|
+
Layout/SpaceBeforeBlockBraces:
|
269
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
270
|
+
Enabled: false
|
271
|
+
|
272
|
+
Layout/SpaceBeforeComma:
|
273
|
+
Description: No spaces before commas.
|
274
|
+
Enabled: false
|
275
|
+
|
276
|
+
Layout/SpaceBeforeComment:
|
277
|
+
Description: Checks for missing space between code and a comment on the same line.
|
278
|
+
Enabled: false
|
279
|
+
|
280
|
+
Layout/SpaceBeforeSemicolon:
|
281
|
+
Description: No spaces before semicolons.
|
282
|
+
Enabled: false
|
283
|
+
|
284
|
+
Layout/SpaceInsideBlockBraces:
|
285
|
+
Description: Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space.
|
286
|
+
Enabled: false
|
287
|
+
|
288
|
+
Layout/SpaceAroundBlockParameters:
|
289
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
290
|
+
Enabled: true
|
291
|
+
|
292
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
293
|
+
Description: Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.
|
294
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
295
|
+
Enabled: true
|
296
|
+
|
297
|
+
Layout/SpaceAroundKeyword:
|
298
|
+
Description: Use a space around keywords if appropriate.
|
299
|
+
Enabled: true
|
300
|
+
|
301
|
+
Layout/SpaceAroundOperators:
|
302
|
+
Description: Use a single space around operators.
|
303
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
304
|
+
Enabled: true
|
305
|
+
|
306
|
+
Layout/SpaceInsideArrayPercentLiteral:
|
307
|
+
Description: No unnecessary additional spaces between elements in %i/%w literals.
|
308
|
+
Enabled: true
|
309
|
+
|
310
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
311
|
+
Description: No unnecessary spaces inside delimiters of %i/%w/%x literals.
|
312
|
+
Enabled: true
|
313
|
+
|
314
|
+
Layout/SpaceInsideHashLiteralBraces:
|
315
|
+
Description: Use spaces inside hash literal braces - or don't.
|
316
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
317
|
+
Enabled: true
|
318
|
+
|
319
|
+
Layout/SpaceInsideParens:
|
320
|
+
Description: No spaces after ( or before ).
|
321
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
322
|
+
Enabled: true
|
323
|
+
|
324
|
+
Layout/SpaceInsideRangeLiteral:
|
325
|
+
Description: No spaces inside range literals.
|
326
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
327
|
+
Enabled: true
|
328
|
+
|
329
|
+
Layout/SpaceInsideStringInterpolation:
|
330
|
+
Description: Checks for padding/surrounding spaces inside string interpolation.
|
331
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
332
|
+
Enabled: false
|
333
|
+
|
334
|
+
Layout/IndentationStyle:
|
335
|
+
Description: No hard tabs.
|
336
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
337
|
+
Enabled: false
|
338
|
+
|
339
|
+
Layout/SpaceAroundMethodCallOperator:
|
340
|
+
Enabled: true
|
341
|
+
|
342
|
+
Layout/TrailingEmptyLines:
|
343
|
+
Description: Checks trailing blank lines and final newline.
|
344
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
345
|
+
Enabled: false
|
346
|
+
|
347
|
+
Layout/TrailingWhitespace:
|
348
|
+
Description: Avoid trailing whitespace.
|
349
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
350
|
+
Enabled: false
|
351
|
+
|
352
|
+
# Department Lint
|
353
|
+
Lint/AmbiguousBlockAssociation:
|
354
|
+
Description: Checks for ambiguous block association with method when param passed without parentheses.
|
355
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#syntax
|
356
|
+
Enabled: false
|
357
|
+
|
358
|
+
Lint/AmbiguousOperator:
|
359
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation without parentheses.
|
360
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
361
|
+
Enabled: true
|
362
|
+
|
363
|
+
Lint/AmbiguousRegexpLiteral:
|
364
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
|
365
|
+
Enabled: true
|
366
|
+
|
367
|
+
Lint/AssignmentInCondition:
|
368
|
+
Description: Don't use assignment in conditions.
|
369
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
370
|
+
Enabled: true
|
371
|
+
|
372
|
+
Layout/BlockAlignment:
|
373
|
+
Description: Align block ends correctly.
|
374
|
+
Enabled: true
|
375
|
+
|
376
|
+
Lint/BooleanSymbol:
|
377
|
+
Description: Check for `:true` and `:false` symbols.
|
378
|
+
Enabled: true
|
379
|
+
|
380
|
+
Lint/CircularArgumentReference:
|
381
|
+
Description: Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument.
|
382
|
+
Enabled: true
|
383
|
+
|
384
|
+
Layout/ConditionPosition:
|
385
|
+
Description: Checks for condition placed in a confusing position relative to the keyword.
|
386
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
387
|
+
Enabled: true
|
388
|
+
|
389
|
+
Lint/Debugger:
|
390
|
+
Description: Check for debugger calls.
|
391
|
+
Enabled: true
|
392
|
+
|
393
|
+
Layout/DefEndAlignment:
|
394
|
+
Description: Align ends corresponding to defs correctly.
|
395
|
+
Enabled: true
|
396
|
+
|
397
|
+
Lint/DeprecatedClassMethods:
|
398
|
+
Description: Check for deprecated class method calls.
|
399
|
+
Enabled: true
|
400
|
+
|
401
|
+
Lint/DuplicateCaseCondition:
|
402
|
+
Description: Do not repeat values in case conditionals.
|
403
|
+
Enabled: true
|
404
|
+
|
405
|
+
Lint/DuplicateMethods:
|
406
|
+
Description: Check for duplicate method definitions.
|
407
|
+
Enabled: true
|
408
|
+
|
409
|
+
Lint/DuplicateHashKey:
|
410
|
+
Description: Check for duplicate keys in hash literals.
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
Lint/EachWithObjectArgument:
|
414
|
+
Description: Check for immutable argument given to each_with_object.
|
415
|
+
Enabled: true
|
416
|
+
|
417
|
+
Lint/ElseLayout:
|
418
|
+
Description: Check for odd code arrangement in an else block.
|
419
|
+
Enabled: true
|
420
|
+
|
421
|
+
Lint/EmptyEnsure:
|
422
|
+
Description: Checks for empty ensure block.
|
423
|
+
Enabled: true
|
424
|
+
AutoCorrect: false
|
425
|
+
|
426
|
+
Lint/EmptyExpression:
|
427
|
+
Description: Checks for empty expressions.
|
428
|
+
Enabled: true
|
429
|
+
|
430
|
+
Lint/EmptyInterpolation:
|
431
|
+
Description: Checks for empty string interpolation.
|
432
|
+
Enabled: true
|
433
|
+
|
434
|
+
Lint/EmptyWhen:
|
435
|
+
Description: Checks for `when` branches with empty bodies.
|
436
|
+
Enabled: true
|
437
|
+
|
438
|
+
Layout/EndAlignment:
|
439
|
+
Description: Align ends correctly.
|
440
|
+
Enabled: true
|
441
|
+
|
442
|
+
Lint/EnsureReturn:
|
443
|
+
Description: Do not use return in an ensure block.
|
444
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
445
|
+
Enabled: true
|
446
|
+
|
447
|
+
Lint/FloatOutOfRange:
|
448
|
+
Description: Catches floating-point literals too large or small for Ruby to represent.
|
449
|
+
Enabled: true
|
450
|
+
|
451
|
+
Lint/FormatParameterMismatch:
|
452
|
+
Description: The number of parameters to format/sprint must match the fields.
|
453
|
+
Enabled: true
|
454
|
+
|
455
|
+
Lint/SuppressedException:
|
456
|
+
Description: Don't suppress exception.
|
457
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
458
|
+
Enabled: true
|
459
|
+
|
460
|
+
Lint/ImplicitStringConcatenation:
|
461
|
+
Description: Checks for adjacent string literals on the same line, which could better be represented as a single string literal.
|
462
|
+
Enabled: true
|
463
|
+
|
464
|
+
Lint/IneffectiveAccessModifier:
|
465
|
+
Description: Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work.
|
466
|
+
Enabled: true
|
467
|
+
|
468
|
+
Lint/InheritException:
|
469
|
+
Description: Avoid inheriting from the `Exception` class.
|
470
|
+
Enabled: true
|
471
|
+
|
472
|
+
Lint/InterpolationCheck:
|
473
|
+
Description: Raise warning for interpolation in single q strs
|
474
|
+
Enabled: true
|
475
|
+
|
476
|
+
Lint/LiteralAsCondition:
|
477
|
+
Description: Checks of literals used in conditions.
|
478
|
+
Enabled: true
|
479
|
+
|
480
|
+
Lint/LiteralInInterpolation:
|
481
|
+
Description: Checks for literals used in interpolation.
|
482
|
+
Enabled: true
|
483
|
+
|
484
|
+
Lint/Loop:
|
485
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.
|
486
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
487
|
+
Enabled: true
|
488
|
+
|
489
|
+
Lint/MultipleComparison:
|
490
|
+
Description: Use `&&` operator to compare multiple value.
|
491
|
+
Enabled: true
|
492
|
+
|
493
|
+
Lint/NestedMethodDefinition:
|
494
|
+
Description: Do not use nested method definitions.
|
495
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
496
|
+
Enabled: true
|
497
|
+
|
498
|
+
Lint/NextWithoutAccumulator:
|
499
|
+
Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
|
500
|
+
Enabled: true
|
501
|
+
|
502
|
+
Lint/NonLocalExitFromIterator:
|
503
|
+
Description: Do not use return in iterator to cause non-local exit.
|
504
|
+
Enabled: true
|
505
|
+
|
506
|
+
Lint/ParenthesesAsGroupedExpression:
|
507
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
508
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
509
|
+
Enabled: true
|
510
|
+
|
511
|
+
Lint/PercentStringArray:
|
512
|
+
Description: Checks for unwanted commas and quotes in %w/%W literals.
|
513
|
+
Enabled: true
|
514
|
+
|
515
|
+
Lint/PercentSymbolArray:
|
516
|
+
Description: Checks for unwanted commas and colons in %i/%I literals.
|
517
|
+
Enabled: true
|
518
|
+
|
519
|
+
Lint/RandOne:
|
520
|
+
Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake.
|
521
|
+
Enabled: true
|
522
|
+
|
523
|
+
Lint/RedundantWithIndex:
|
524
|
+
Description: Checks for redundant `with_index`.
|
525
|
+
Enabled: true
|
526
|
+
|
527
|
+
Lint/RedundantWithObject:
|
528
|
+
Description: Checks for redundant `with_object`.
|
529
|
+
Enabled: true
|
530
|
+
|
531
|
+
Lint/RegexpAsCondition:
|
532
|
+
Description: Do not use regexp literal as a condition. The regexp literal matches `$_` implicitly.
|
533
|
+
Enabled: true
|
534
|
+
|
535
|
+
Lint/RequireParentheses:
|
536
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
537
|
+
Enabled: true
|
538
|
+
|
539
|
+
Lint/RescueException:
|
540
|
+
Description: Avoid rescuing the Exception class.
|
541
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
542
|
+
Enabled: true
|
543
|
+
|
544
|
+
Lint/RescueType:
|
545
|
+
Description: Avoid rescuing from non constants that could result in a `TypeError`.
|
546
|
+
Enabled: true
|
547
|
+
|
548
|
+
Lint/SafeNavigationChain:
|
549
|
+
Description: Do not chain ordinary method call after safe navigation operator.
|
550
|
+
Enabled: true
|
551
|
+
|
552
|
+
Lint/ScriptPermission:
|
553
|
+
Description: Grant script file execute permission.
|
554
|
+
Enabled: true
|
555
|
+
|
556
|
+
Lint/ShadowedException:
|
557
|
+
Description: Avoid rescuing a higher level exception before a lower level exception.
|
558
|
+
Enabled: true
|
559
|
+
|
560
|
+
Lint/ShadowingOuterLocalVariable:
|
561
|
+
Description: Do not use the same name as outer local variable for block arguments or block local variables.
|
562
|
+
Enabled: true
|
563
|
+
|
564
|
+
Lint/RedundantStringCoercion:
|
565
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
566
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
567
|
+
Enabled: true
|
568
|
+
|
569
|
+
Lint/UnderscorePrefixedVariableName:
|
570
|
+
Description: Do not use prefix `_` for a variable that is used.
|
571
|
+
Enabled: true
|
572
|
+
|
573
|
+
Lint/UnifiedInteger:
|
574
|
+
Description: Use Integer instead of Fixnum or Bignum
|
575
|
+
Enabled: true
|
576
|
+
|
577
|
+
Lint/RedundantRequireStatement:
|
578
|
+
Description: Checks for unnecessary `require` statement.
|
579
|
+
Enabled: true
|
580
|
+
|
581
|
+
Lint/RedundantSplatExpansion:
|
582
|
+
Description: Checks for splat unnecessarily being called on literals
|
583
|
+
Enabled: true
|
584
|
+
|
585
|
+
Lint/UnusedBlockArgument:
|
586
|
+
Description: Checks for unused block arguments.
|
587
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
588
|
+
Enabled: true
|
589
|
+
|
590
|
+
Lint/UnusedMethodArgument:
|
591
|
+
Description: Checks for unused method arguments.
|
592
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
593
|
+
Enabled: true
|
594
|
+
|
595
|
+
Lint/UnreachableCode:
|
596
|
+
Description: Unreachable code.
|
597
|
+
Enabled: true
|
598
|
+
|
599
|
+
Lint/UriEscapeUnescape:
|
600
|
+
Description: '`URI.escape` method is obsolete and should not be used. Instead, use `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending on your specific use case. Also `URI.unescape` method is obsolete and should not be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component` depending on your specific use case.'
|
601
|
+
Enabled: true
|
602
|
+
|
603
|
+
Lint/UriRegexp:
|
604
|
+
Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
|
605
|
+
Enabled: true
|
606
|
+
|
607
|
+
Lint/UselessAccessModifier:
|
608
|
+
Description: Checks for useless access modifiers.
|
609
|
+
Enabled: true
|
610
|
+
ContextCreatingMethods: []
|
611
|
+
MethodCreatingMethods: []
|
612
|
+
|
613
|
+
Lint/UselessAssignment:
|
614
|
+
Description: Checks for useless assignment to a local variable.
|
615
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
616
|
+
Enabled: true
|
617
|
+
|
618
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
619
|
+
Description: Checks for comparison of something with itself.
|
620
|
+
Enabled: true
|
621
|
+
|
622
|
+
Lint/UselessElseWithoutRescue:
|
623
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
624
|
+
Enabled: true
|
625
|
+
|
626
|
+
Lint/ReturnInVoidContext:
|
627
|
+
Description: Checks for return in void context.
|
628
|
+
Enabled: true
|
629
|
+
|
630
|
+
Lint/UselessSetterCall:
|
631
|
+
Description: Checks for useless setter call to a local variable.
|
632
|
+
Enabled: true
|
633
|
+
|
634
|
+
Lint/Void:
|
635
|
+
Description: Possible use of operator/literal/variable in void context.
|
636
|
+
Enabled: true
|
637
|
+
|
638
|
+
# Department Metrics
|
639
|
+
Metrics/AbcSize:
|
640
|
+
Description: A calculated magnitude based on number of assignments, branches, and conditions.
|
641
|
+
Reference: http://c2.com/cgi/wiki?AbcMetric
|
642
|
+
Enabled: true
|
643
|
+
Max: 15
|
644
|
+
|
645
|
+
Metrics/BlockLength:
|
646
|
+
Description: Avoid long blocks with many lines.
|
647
|
+
Enabled: true
|
648
|
+
Exclude:
|
649
|
+
- Rakefile
|
650
|
+
- "**/*.rake"
|
651
|
+
- spec/**/*.rb
|
652
|
+
- 'config/environments/*.rb'
|
653
|
+
- 'config/routes.rb'
|
654
|
+
|
655
|
+
Metrics/BlockNesting:
|
656
|
+
Description: Avoid excessive block nesting
|
657
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
658
|
+
Enabled: true
|
659
|
+
Max: 4
|
660
|
+
|
661
|
+
Metrics/ClassLength:
|
662
|
+
Description: Avoid classes longer than 100 lines of code.
|
663
|
+
Enabled: true
|
664
|
+
Max: 100
|
665
|
+
|
666
|
+
Metrics/CyclomaticComplexity:
|
667
|
+
Description: A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
|
668
|
+
Enabled: true
|
669
|
+
|
670
|
+
Layout/LineLength:
|
671
|
+
Description: Limit lines to 80 characters.
|
672
|
+
StyleGuide: '#80-character-limits'
|
673
|
+
Enabled: true
|
674
|
+
Max: 80
|
675
|
+
Exclude:
|
676
|
+
- 'db/**/*'
|
677
|
+
- 'config/initializers/**/*'
|
678
|
+
- 'config/environments/**/*'
|
679
|
+
|
680
|
+
Metrics/MethodLength:
|
681
|
+
Description: Avoid methods longer than 10 lines of code.
|
682
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
683
|
+
Enabled: true
|
684
|
+
Max: 6
|
685
|
+
Exclude:
|
686
|
+
- 'db/**/*'
|
687
|
+
|
688
|
+
Metrics/ModuleLength:
|
689
|
+
Description: Avoid modules longer than 100 lines of code.
|
690
|
+
Enabled: true
|
691
|
+
Max: 100
|
692
|
+
|
693
|
+
Metrics/ParameterLists:
|
694
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
695
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
696
|
+
Enabled: false
|
697
|
+
|
698
|
+
Metrics/PerceivedComplexity:
|
699
|
+
Description: A complexity metric geared towards measuring complexity for a human reader.
|
700
|
+
Enabled: true
|
701
|
+
|
702
|
+
# Department Naming
|
703
|
+
Naming/AccessorMethodName:
|
704
|
+
Description: Check the naming of accessor methods for get_/set_.
|
705
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names
|
706
|
+
Enabled: false
|
707
|
+
|
708
|
+
Naming/AsciiIdentifiers:
|
709
|
+
Description: Use only ascii symbols in identifiers.
|
710
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
711
|
+
Enabled: false
|
712
|
+
|
713
|
+
Naming/ClassAndModuleCamelCase:
|
714
|
+
Description: Use CamelCase for classes and modules.
|
715
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
716
|
+
Enabled: true
|
717
|
+
|
718
|
+
Naming/ConstantName:
|
719
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
720
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
721
|
+
Enabled: true
|
722
|
+
|
723
|
+
Naming/FileName:
|
724
|
+
Description: Use snake_case for source file names.
|
725
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
726
|
+
Enabled: true
|
727
|
+
|
728
|
+
Naming/HeredocDelimiterCase:
|
729
|
+
Description: Use configured case for heredoc delimiters.
|
730
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
731
|
+
Enabled: true
|
732
|
+
|
733
|
+
Naming/HeredocDelimiterNaming:
|
734
|
+
Description: Use descriptive heredoc delimiters.
|
735
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
736
|
+
Enabled: true
|
737
|
+
|
738
|
+
Naming/MethodName:
|
739
|
+
Description: Use the configured style when naming methods.
|
740
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
741
|
+
Enabled: false
|
742
|
+
|
743
|
+
Naming/PredicateName:
|
744
|
+
Description: Check the names of predicate methods.
|
745
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
746
|
+
Enabled: true
|
747
|
+
|
748
|
+
Naming/BinaryOperatorParameterName:
|
749
|
+
Description: When defining binary operators, name the argument other.
|
750
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
751
|
+
Enabled: true
|
752
|
+
|
753
|
+
Naming/VariableName:
|
754
|
+
Description: Use the configured style when naming variables.
|
755
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
756
|
+
Enabled: true
|
757
|
+
|
758
|
+
Naming/VariableNumber:
|
759
|
+
Description: Use the configured style when numbering variables.
|
760
|
+
Enabled: true
|
761
|
+
|
762
|
+
Naming/MemoizedInstanceVariableName:
|
763
|
+
Enabled: true
|
764
|
+
Exclude:
|
765
|
+
- app/controllers/*.rb
|
766
|
+
# Department Performance
|
767
|
+
Performance/Caller:
|
768
|
+
Description: Use `caller(n..n)` instead of `caller`.
|
769
|
+
Enabled: true
|
770
|
+
|
771
|
+
Performance/Casecmp:
|
772
|
+
Description: Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
|
773
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
|
774
|
+
Enabled: true
|
775
|
+
|
776
|
+
Performance/CaseWhenSplat:
|
777
|
+
Description: Place `when` conditions that use splat at the end of the list of `when` branches.
|
778
|
+
Enabled: true
|
779
|
+
|
780
|
+
Performance/Count:
|
781
|
+
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`, `reject...count`, `select...length`, and `reject...length`.
|
782
|
+
SafeAutoCorrect: true
|
783
|
+
Enabled: true
|
784
|
+
|
785
|
+
Performance/Detect:
|
786
|
+
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`, and `find_all.last`.
|
787
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
788
|
+
SafeAutoCorrect: true
|
789
|
+
Enabled: true
|
790
|
+
|
791
|
+
Performance/DoubleStartEndWith:
|
792
|
+
Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
793
|
+
Enabled: true
|
794
|
+
|
795
|
+
Performance/EndWith:
|
796
|
+
Description: Use `end_with?` instead of a regex match anchored to the end of a string.
|
797
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
798
|
+
AutoCorrect: false
|
799
|
+
Enabled: true
|
800
|
+
|
801
|
+
Performance/FixedSize:
|
802
|
+
Description: Do not compute the size of statically sized objects except in constants
|
803
|
+
Enabled: true
|
804
|
+
|
805
|
+
Performance/FlatMap:
|
806
|
+
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)` or `Enumberable#collect..Array#flatten(1)`
|
807
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
808
|
+
Enabled: true
|
809
|
+
EnabledForFlattenWithoutParams: false
|
810
|
+
|
811
|
+
Performance/RangeInclude:
|
812
|
+
Description: Use `Range#cover?` instead of `Range#include?`.
|
813
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
|
814
|
+
Enabled: true
|
815
|
+
|
816
|
+
Performance/RedundantBlockCall:
|
817
|
+
Description: Use `yield` instead of `block.call`.
|
818
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
|
819
|
+
Enabled: true
|
820
|
+
|
821
|
+
Performance/RedundantMatch:
|
822
|
+
Description: Use `=~` instead of `String#match` or `Regexp#match` in a context where the returned `MatchData` is not needed.
|
823
|
+
Enabled: true
|
824
|
+
|
825
|
+
Performance/RedundantMerge:
|
826
|
+
Description: Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
|
827
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
|
828
|
+
Enabled: true
|
829
|
+
|
830
|
+
Style/ExponentialNotation:
|
831
|
+
Enabled: true
|
832
|
+
|
833
|
+
Style/RedundantSortBy:
|
834
|
+
Description: Use `sort` instead of `sort_by { |x| x }`.
|
835
|
+
Enabled: true
|
836
|
+
|
837
|
+
Performance/RegexpMatch:
|
838
|
+
Description: Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.
|
839
|
+
Enabled: true
|
840
|
+
|
841
|
+
Performance/ReverseEach:
|
842
|
+
Description: Use `reverse_each` instead of `reverse.each`.
|
843
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
844
|
+
Enabled: true
|
845
|
+
|
846
|
+
Style/Sample:
|
847
|
+
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.
|
848
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
849
|
+
Enabled: true
|
850
|
+
|
851
|
+
Performance/Size:
|
852
|
+
Description: Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.
|
853
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
854
|
+
Enabled: true
|
855
|
+
|
856
|
+
Performance/CompareWithBlock:
|
857
|
+
Description: Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
|
858
|
+
Enabled: true
|
859
|
+
|
860
|
+
Performance/StartWith:
|
861
|
+
Description: Use `start_with?` instead of a regex match anchored to the beginning of a string.
|
862
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
863
|
+
AutoCorrect: false
|
864
|
+
Enabled: true
|
865
|
+
|
866
|
+
Performance/StringReplacement:
|
867
|
+
Description: Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
|
868
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
869
|
+
Enabled: true
|
870
|
+
|
871
|
+
Performance/TimesMap:
|
872
|
+
Description: Checks for .times.map calls.
|
873
|
+
AutoCorrect: false
|
874
|
+
Enabled: true
|
875
|
+
|
876
|
+
Performance/UnfreezeString:
|
877
|
+
Description: Use unary plus to get an unfrozen string literal.
|
878
|
+
Enabled: true
|
879
|
+
|
880
|
+
Performance/UriDefaultParser:
|
881
|
+
Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
|
882
|
+
Enabled: true
|
883
|
+
|
884
|
+
# Department Security
|
885
|
+
Security/Eval:
|
886
|
+
Description: The use of eval represents a serious security risk.
|
887
|
+
Enabled: true
|
888
|
+
|
889
|
+
Security/JSONLoad:
|
890
|
+
Description: Prefer usage of `JSON.parse` over `JSON.load` due to potential security issues. See reference for more information.
|
891
|
+
Reference: http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load
|
892
|
+
Enabled: true
|
893
|
+
AutoCorrect: false
|
894
|
+
|
895
|
+
Security/MarshalLoad:
|
896
|
+
Description: Avoid using of `Marshal.load` or `Marshal.restore` due to potential security issues. See reference for more information.
|
897
|
+
Reference: http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations
|
898
|
+
Enabled: true
|
899
|
+
|
900
|
+
Security/YAMLLoad:
|
901
|
+
Description: Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security issues. See reference for more information.
|
902
|
+
Reference: https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security
|
903
|
+
Enabled: true
|
904
|
+
|
905
|
+
Security/Open:
|
906
|
+
Exclude:
|
907
|
+
- db/migrate/*.rb
|
908
|
+
# Department Style
|
909
|
+
Style/Alias:
|
910
|
+
Description: Use alias instead of alias_method.
|
911
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
912
|
+
Enabled: false
|
913
|
+
|
914
|
+
Style/AndOr:
|
915
|
+
Description: Use &&/|| instead of and/or.
|
916
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
917
|
+
Enabled: true
|
918
|
+
|
919
|
+
Style/ArrayJoin:
|
920
|
+
Description: Use Array#join instead of Array#*.
|
921
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join'
|
922
|
+
Enabled: false
|
923
|
+
|
924
|
+
Style/AsciiComments:
|
925
|
+
Description: Use only ascii symbols in comments.
|
926
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
927
|
+
Enabled: false
|
928
|
+
|
929
|
+
Style/Attr:
|
930
|
+
Description: Checks for uses of Module#attr.
|
931
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
932
|
+
Enabled: true
|
933
|
+
|
934
|
+
Style/AutoResourceCleanup:
|
935
|
+
Description: Suggests the usage of an auto resource cleanup version of a method (if available).
|
936
|
+
Enabled: false
|
937
|
+
|
938
|
+
Style/BeginBlock:
|
939
|
+
Description: Avoid the use of BEGIN blocks.
|
940
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
941
|
+
Enabled: true
|
942
|
+
|
943
|
+
Style/BarePercentLiterals:
|
944
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
945
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
946
|
+
Enabled: true
|
947
|
+
|
948
|
+
Style/BlockComments:
|
949
|
+
Description: Do not use block comments.
|
950
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
951
|
+
Enabled: false
|
952
|
+
|
953
|
+
Style/BlockDelimiters:
|
954
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always ugly). Prefer {...} over do...end for single-line blocks.
|
955
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
956
|
+
Enabled: true
|
957
|
+
|
958
|
+
Style/CaseEquality:
|
959
|
+
Description: Avoid explicit use of the case equality operator(===).
|
960
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
961
|
+
Enabled: false
|
962
|
+
|
963
|
+
Style/CharacterLiteral:
|
964
|
+
Description: Checks for uses of character literals.
|
965
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
966
|
+
Enabled: false
|
967
|
+
|
968
|
+
Style/ClassAndModuleChildren:
|
969
|
+
Description: Checks style of children classes and modules.
|
970
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#namespace-definition
|
971
|
+
Enabled: false
|
972
|
+
|
973
|
+
Style/ClassCheck:
|
974
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
975
|
+
Enabled: true
|
976
|
+
|
977
|
+
Style/ClassMethods:
|
978
|
+
Description: Use self when defining module/class methods.
|
979
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
|
980
|
+
Enabled: false
|
981
|
+
|
982
|
+
Style/ClassVars:
|
983
|
+
Description: Avoid the use of class variables.
|
984
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
985
|
+
Enabled: false
|
986
|
+
|
987
|
+
Style/CollectionMethods:
|
988
|
+
Description: Preferred collection methods.
|
989
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
990
|
+
Enabled: false
|
991
|
+
|
992
|
+
Style/ColonMethodCall:
|
993
|
+
Description: 'Do not use :: for method call.'
|
994
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
995
|
+
Enabled: true
|
996
|
+
|
997
|
+
Style/CommandLiteral:
|
998
|
+
Description: Use `` or %x around command literals.
|
999
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
1000
|
+
Enabled: false
|
1001
|
+
|
1002
|
+
Style/CommentAnnotation:
|
1003
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
1004
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
1005
|
+
Enabled: false
|
1006
|
+
|
1007
|
+
Style/CommentedKeyword:
|
1008
|
+
Description: Do not place comments on the same line as certain keywords.
|
1009
|
+
Enabled: false
|
1010
|
+
|
1011
|
+
Style/ConditionalAssignment:
|
1012
|
+
Description: Use the return value of `if` and `case` statements for assignment to a variable and variable comparison instead of assigning that variable inside of each branch.
|
1013
|
+
Enabled: true
|
1014
|
+
|
1015
|
+
Style/Copyright:
|
1016
|
+
Description: Include a copyright notice in each file before any code.
|
1017
|
+
Enabled: false
|
1018
|
+
|
1019
|
+
Style/DateTime:
|
1020
|
+
Description: Use Date or Time over DateTime.
|
1021
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#date--time
|
1022
|
+
Enabled: false
|
1023
|
+
|
1024
|
+
Style/DefWithParentheses:
|
1025
|
+
Description: Use def with parentheses when there are arguments.
|
1026
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1027
|
+
Enabled: true
|
1028
|
+
|
1029
|
+
Style/Dir:
|
1030
|
+
Description: Use the `__dir__` method to retrieve the canonicalized absolute path to the current file.
|
1031
|
+
Enabled: true
|
1032
|
+
|
1033
|
+
Style/Documentation:
|
1034
|
+
Description: Document classes and non-namespace modules.
|
1035
|
+
Enabled: false
|
1036
|
+
Exclude:
|
1037
|
+
- 'spec/**/*'
|
1038
|
+
- 'test/**/*'
|
1039
|
+
|
1040
|
+
Style/DocumentationMethod:
|
1041
|
+
Description: Public methods.
|
1042
|
+
Enabled: false
|
1043
|
+
Exclude:
|
1044
|
+
- 'spec/**/*'
|
1045
|
+
- 'test/**/*'
|
1046
|
+
|
1047
|
+
Style/DoubleNegation:
|
1048
|
+
Description: Checks for uses of double negation (!!).
|
1049
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
1050
|
+
Enabled: true
|
1051
|
+
|
1052
|
+
Style/EachForSimpleLoop:
|
1053
|
+
Description: Use `Integer#times` for a simple loop which iterates a fixed number of times.
|
1054
|
+
Enabled: true
|
1055
|
+
|
1056
|
+
Style/EachWithObject:
|
1057
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
1058
|
+
Enabled: false
|
1059
|
+
|
1060
|
+
Style/EmptyElse:
|
1061
|
+
Description: Avoid empty else-clauses.
|
1062
|
+
Enabled: true
|
1063
|
+
|
1064
|
+
Style/EmptyCaseCondition:
|
1065
|
+
Description: Avoid empty condition in case statements.
|
1066
|
+
Enabled: false
|
1067
|
+
|
1068
|
+
Style/EmptyLiteral:
|
1069
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
1070
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
1071
|
+
Enabled: false
|
1072
|
+
|
1073
|
+
Style/EmptyMethod:
|
1074
|
+
Description: Checks the formatting of empty method definitions.
|
1075
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1076
|
+
Enabled: false
|
1077
|
+
|
1078
|
+
Style/EndBlock:
|
1079
|
+
Description: Avoid the use of END blocks.
|
1080
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
1081
|
+
Enabled: true
|
1082
|
+
|
1083
|
+
Style/Encoding:
|
1084
|
+
Description: Use UTF-8 as the source file encoding.
|
1085
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
1086
|
+
Enabled: true
|
1087
|
+
|
1088
|
+
Style/EvenOdd:
|
1089
|
+
Description: Favor the use of Integer#even? && Integer#odd?
|
1090
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1091
|
+
Enabled: true
|
1092
|
+
|
1093
|
+
Style/FrozenStringLiteralComment:
|
1094
|
+
Description: Add the frozen_string_literal comment to the top of files to help transition from Ruby 2.3.0 to Ruby 3.0.
|
1095
|
+
Enabled: true
|
1096
|
+
|
1097
|
+
Lint/FlipFlop:
|
1098
|
+
Description: Checks for flip flops
|
1099
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
1100
|
+
Enabled: true
|
1101
|
+
|
1102
|
+
Style/For:
|
1103
|
+
Description: Checks use of for or each in multiline loops.
|
1104
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
1105
|
+
Enabled: true
|
1106
|
+
|
1107
|
+
Style/FormatString:
|
1108
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
1109
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
1110
|
+
Enabled: false
|
1111
|
+
|
1112
|
+
Style/FormatStringToken:
|
1113
|
+
Description: Use a consistent style for format string tokens.
|
1114
|
+
Enabled: true
|
1115
|
+
|
1116
|
+
Style/GlobalVars:
|
1117
|
+
Description: Do not introduce global variables.
|
1118
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
1119
|
+
Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
|
1120
|
+
Enabled: true
|
1121
|
+
|
1122
|
+
Style/GuardClause:
|
1123
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
1124
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1125
|
+
Enabled: true
|
1126
|
+
|
1127
|
+
Style/HashSyntax:
|
1128
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }.'
|
1129
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
1130
|
+
Enabled: true
|
1131
|
+
|
1132
|
+
Style/IfInsideElse:
|
1133
|
+
Description: Finds if nodes inside else, which can be converted to elsif.
|
1134
|
+
Enabled: true
|
1135
|
+
|
1136
|
+
Style/IfUnlessModifier:
|
1137
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
1138
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
1139
|
+
Enabled: true
|
1140
|
+
|
1141
|
+
Style/IfUnlessModifierOfIfUnless:
|
1142
|
+
Description: Avoid modifier if/unless usage on conditionals.
|
1143
|
+
Enabled: true
|
1144
|
+
|
1145
|
+
Style/IfWithSemicolon:
|
1146
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
1147
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
1148
|
+
Enabled: true
|
1149
|
+
|
1150
|
+
Style/IdenticalConditionalBranches:
|
1151
|
+
Description: Checks that conditional statements do not have an identical line at the end of each branch, which can validly be moved out of the conditional.
|
1152
|
+
Enabled: true
|
1153
|
+
|
1154
|
+
Style/InfiniteLoop:
|
1155
|
+
Description: Use Kernel#loop for infinite loops.
|
1156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
1157
|
+
Enabled: true
|
1158
|
+
|
1159
|
+
Style/InlineComment:
|
1160
|
+
Description: Avoid trailing inline comments.
|
1161
|
+
Enabled: false
|
1162
|
+
|
1163
|
+
Style/InverseMethods:
|
1164
|
+
Description: Use the inverse method instead of `!.method` if an inverse method is defined.
|
1165
|
+
Enabled: true
|
1166
|
+
|
1167
|
+
Style/ImplicitRuntimeError:
|
1168
|
+
Description: Use `raise` or `fail` with an explicit exception class and message, rather than just a message.
|
1169
|
+
Enabled: false
|
1170
|
+
|
1171
|
+
Style/Lambda:
|
1172
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
1173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
1174
|
+
Enabled: true
|
1175
|
+
|
1176
|
+
Style/LambdaCall:
|
1177
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
1178
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
1179
|
+
Enabled: false
|
1180
|
+
|
1181
|
+
Style/LineEndConcatenation:
|
1182
|
+
Description: Use \ instead of + or << to concatenate two string literals at line end.
|
1183
|
+
Enabled: true
|
1184
|
+
|
1185
|
+
Style/MethodCallWithoutArgsParentheses:
|
1186
|
+
Description: Do not use parentheses for method calls with no arguments.
|
1187
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
1188
|
+
Enabled: true
|
1189
|
+
|
1190
|
+
Style/MethodCallWithArgsParentheses:
|
1191
|
+
Description: Use parentheses for method calls with arguments.
|
1192
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
1193
|
+
Enabled: false
|
1194
|
+
|
1195
|
+
Style/MethodCalledOnDoEndBlock:
|
1196
|
+
Description: Avoid chaining a method call on a do...end block.
|
1197
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1198
|
+
Enabled: false
|
1199
|
+
|
1200
|
+
Style/MethodDefParentheses:
|
1201
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
1202
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1203
|
+
Enabled: true
|
1204
|
+
|
1205
|
+
Style/MissingRespondToMissing:
|
1206
|
+
Enabled: true
|
1207
|
+
|
1208
|
+
Style/MinMax:
|
1209
|
+
Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max` in conjunction.'
|
1210
|
+
Enabled: true
|
1211
|
+
|
1212
|
+
Style/MissingElse:
|
1213
|
+
Description: Require if/case expressions to have an else branches. If enabled, it is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict with Style/EmptyElse if Style/EmptyElse is configured to style "both"
|
1214
|
+
Enabled: false
|
1215
|
+
EnforcedStyle: both
|
1216
|
+
SupportedStyles:
|
1217
|
+
- if
|
1218
|
+
- case
|
1219
|
+
- both
|
1220
|
+
|
1221
|
+
Style/MixinGrouping:
|
1222
|
+
Description: Checks for grouping of mixins in `class` and `module` bodies.
|
1223
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#mixin-grouping
|
1224
|
+
Enabled: true
|
1225
|
+
|
1226
|
+
Style/ModuleFunction:
|
1227
|
+
Description: Checks for usage of `extend self` in modules.
|
1228
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
1229
|
+
Enabled: true
|
1230
|
+
|
1231
|
+
Style/MultilineBlockChain:
|
1232
|
+
Description: Avoid multi-line chains of blocks.
|
1233
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1234
|
+
Enabled: false
|
1235
|
+
|
1236
|
+
Style/MultilineIfThen:
|
1237
|
+
Description: Do not use then for multi-line if/unless.
|
1238
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
1239
|
+
Enabled: true
|
1240
|
+
|
1241
|
+
Style/MultilineIfModifier:
|
1242
|
+
Description: Only use if/unless modifiers on single line statements.
|
1243
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-if-modifiers
|
1244
|
+
Enabled: true
|
1245
|
+
|
1246
|
+
Style/MultilineMemoization:
|
1247
|
+
Description: Wrap multiline memoizations in a `begin` and `end` block.
|
1248
|
+
Enabled: true
|
1249
|
+
|
1250
|
+
Style/MultilineTernaryOperator:
|
1251
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
1252
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
1253
|
+
Enabled: true
|
1254
|
+
|
1255
|
+
Style/MultipleComparison:
|
1256
|
+
Description: Avoid comparing a variable with multiple items in a conditional, use Array#include? instead.
|
1257
|
+
Enabled: true
|
1258
|
+
|
1259
|
+
Style/MutableConstant:
|
1260
|
+
Description: Do not assign mutable objects to constants.
|
1261
|
+
Enabled: false
|
1262
|
+
|
1263
|
+
Style/NegatedIf:
|
1264
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
1265
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
1266
|
+
Enabled: true
|
1267
|
+
|
1268
|
+
Style/NegatedWhile:
|
1269
|
+
Description: Favor until over while for negative conditions.
|
1270
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
1271
|
+
Enabled: true
|
1272
|
+
|
1273
|
+
Style/NestedModifier:
|
1274
|
+
Description: Avoid using nested modifiers.
|
1275
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
|
1276
|
+
Enabled: true
|
1277
|
+
|
1278
|
+
Style/NestedParenthesizedCalls:
|
1279
|
+
Description: Parenthesize method calls which are nested inside the argument list of another parenthesized method call.
|
1280
|
+
Enabled: true
|
1281
|
+
|
1282
|
+
Style/NestedTernaryOperator:
|
1283
|
+
Description: Use one expression per branch in a ternary operator.
|
1284
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
1285
|
+
Enabled: true
|
1286
|
+
|
1287
|
+
Style/Next:
|
1288
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
1289
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1290
|
+
Enabled: true
|
1291
|
+
|
1292
|
+
Style/NilComparison:
|
1293
|
+
Description: 'Prefer x.nil? to x == nil.'
|
1294
|
+
StyleGuide: '#predicate-methods'
|
1295
|
+
Enabled: true
|
1296
|
+
|
1297
|
+
Style/NonNilCheck:
|
1298
|
+
Description: Checks for redundant nil checks.
|
1299
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
1300
|
+
Enabled: true
|
1301
|
+
|
1302
|
+
Style/Not:
|
1303
|
+
Description: Use ! instead of not.
|
1304
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
1305
|
+
Enabled: true
|
1306
|
+
|
1307
|
+
Style/NumericLiterals:
|
1308
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
1309
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
1310
|
+
Enabled: true
|
1311
|
+
|
1312
|
+
Style/NumericLiteralPrefix:
|
1313
|
+
Description: Use smallcase prefixes for numeric literals.
|
1314
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes
|
1315
|
+
Enabled: true
|
1316
|
+
|
1317
|
+
Style/NumericPredicate:
|
1318
|
+
Description: Checks for the use of predicate- or comparison methods for numeric comparisons.
|
1319
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1320
|
+
AutoCorrect: false
|
1321
|
+
Enabled: true
|
1322
|
+
|
1323
|
+
Style/OneLineConditional:
|
1324
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
1325
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
1326
|
+
Enabled: false
|
1327
|
+
|
1328
|
+
Style/OptionalArguments:
|
1329
|
+
Description: Checks for optional arguments that do not appear at the end of the argument list
|
1330
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
|
1331
|
+
Enabled: false
|
1332
|
+
|
1333
|
+
Style/OptionHash:
|
1334
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
1335
|
+
Enabled: false
|
1336
|
+
|
1337
|
+
Style/OrAssignment:
|
1338
|
+
Description: Recommend usage of double pipe equals (||=) where applicable.
|
1339
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-pipe-for-uninit
|
1340
|
+
Enabled: true
|
1341
|
+
|
1342
|
+
Style/ParallelAssignment:
|
1343
|
+
Description: Check for simple usages of parallel assignment. It will only warn when the number of variables matches on both sides of the assignment.
|
1344
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
|
1345
|
+
Enabled: false
|
1346
|
+
|
1347
|
+
Style/ParenthesesAroundCondition:
|
1348
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
1349
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-around-condition
|
1350
|
+
Enabled: true
|
1351
|
+
|
1352
|
+
Style/PercentLiteralDelimiters:
|
1353
|
+
Description: Use `%`-literal delimiters consistently
|
1354
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
1355
|
+
Enabled: true
|
1356
|
+
PreferredDelimiters:
|
1357
|
+
default: ()
|
1358
|
+
'%i': '()'
|
1359
|
+
'%I': '()'
|
1360
|
+
'%r': '{}'
|
1361
|
+
'%w': '()'
|
1362
|
+
'%W': '()'
|
1363
|
+
|
1364
|
+
Style/PercentQLiterals:
|
1365
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
1366
|
+
Enabled: true
|
1367
|
+
|
1368
|
+
Style/PerlBackrefs:
|
1369
|
+
Description: Avoid Perl-style regex back references.
|
1370
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
1371
|
+
Enabled: false
|
1372
|
+
|
1373
|
+
Style/PreferredHashMethods:
|
1374
|
+
Description: Checks use of `has_key?` and `has_value?` Hash methods.
|
1375
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
1376
|
+
Enabled: true
|
1377
|
+
|
1378
|
+
Style/Proc:
|
1379
|
+
Description: Use proc instead of Proc.new.
|
1380
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
1381
|
+
Enabled: true
|
1382
|
+
|
1383
|
+
Style/RaiseArgs:
|
1384
|
+
Description: Checks the arguments passed to raise/fail.
|
1385
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
1386
|
+
Enabled: false
|
1387
|
+
|
1388
|
+
Style/RedundantBegin:
|
1389
|
+
Description: Don't use begin blocks when they are not needed.
|
1390
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
1391
|
+
Enabled: true
|
1392
|
+
|
1393
|
+
Style/RedundantConditional:
|
1394
|
+
Description: Don't return true/false from a conditional.
|
1395
|
+
Enabled: true
|
1396
|
+
|
1397
|
+
Style/RedundantException:
|
1398
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
1399
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
1400
|
+
Enabled: true
|
1401
|
+
|
1402
|
+
Style/RedundantFreeze:
|
1403
|
+
Description: Checks usages of Object#freeze on immutable objects.
|
1404
|
+
Enabled: true
|
1405
|
+
|
1406
|
+
Style/RedundantParentheses:
|
1407
|
+
Description: Checks for parentheses that seem not to serve any purpose.
|
1408
|
+
Enabled: true
|
1409
|
+
|
1410
|
+
Style/RedundantReturn:
|
1411
|
+
Description: Don't use return where it's not required.
|
1412
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
1413
|
+
Enabled: true
|
1414
|
+
|
1415
|
+
Style/RedundantSelf:
|
1416
|
+
Description: Don't use self where it's not needed.
|
1417
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
1418
|
+
Enabled: true
|
1419
|
+
|
1420
|
+
Style/RegexpLiteral:
|
1421
|
+
Description: Use / or %r around regular expressions.
|
1422
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
1423
|
+
Enabled: false
|
1424
|
+
|
1425
|
+
Style/RescueModifier:
|
1426
|
+
Description: Avoid using rescue in its modifier form.
|
1427
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
1428
|
+
Enabled: false
|
1429
|
+
|
1430
|
+
Style/RescueStandardError:
|
1431
|
+
Description: Avoid rescuing without specifying an error class.
|
1432
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
1433
|
+
Enabled: true
|
1434
|
+
|
1435
|
+
Style/ReturnNil:
|
1436
|
+
Description: Use return instead of return nil.
|
1437
|
+
Enabled: false
|
1438
|
+
|
1439
|
+
Style/SafeNavigation:
|
1440
|
+
Description: This cop transforms usages of a method call safeguarded by a check for the existance of the object to safe navigation (`&.`).
|
1441
|
+
Enabled: true
|
1442
|
+
|
1443
|
+
Style/SelfAssignment:
|
1444
|
+
Description: Checks for places where self-assignment shorthand should have been used.
|
1445
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
1446
|
+
Enabled: true
|
1447
|
+
|
1448
|
+
Style/Semicolon:
|
1449
|
+
Description: Don't use semicolons to terminate expressions.
|
1450
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
1451
|
+
Enabled: true
|
1452
|
+
|
1453
|
+
Style/Send:
|
1454
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.
|
1455
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
1456
|
+
Enabled: false
|
1457
|
+
|
1458
|
+
Style/SignalException:
|
1459
|
+
Description: Checks for proper usage of fail and raise.
|
1460
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail
|
1461
|
+
Enabled: true
|
1462
|
+
|
1463
|
+
Style/SingleLineBlockParams:
|
1464
|
+
Description: Enforces the names of some block params.
|
1465
|
+
Enabled: false
|
1466
|
+
|
1467
|
+
Style/SingleLineMethods:
|
1468
|
+
Description: Avoid single-line methods.
|
1469
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1470
|
+
Enabled: false
|
1471
|
+
|
1472
|
+
Style/SpecialGlobalVars:
|
1473
|
+
Description: Avoid Perl-style global variables.
|
1474
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
1475
|
+
Enabled: false
|
1476
|
+
|
1477
|
+
Style/StabbyLambdaParentheses:
|
1478
|
+
Description: Check for the usage of parentheses around stabby lambda arguments.
|
1479
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
|
1480
|
+
Enabled: true
|
1481
|
+
|
1482
|
+
Style/StderrPuts:
|
1483
|
+
Description: Use `warn` instead of `$stderr.puts`.
|
1484
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#warn
|
1485
|
+
Enabled: true
|
1486
|
+
|
1487
|
+
Style/StringLiterals:
|
1488
|
+
Description: Checks if uses of quotes match the configured preference.
|
1489
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
1490
|
+
EnforcedStyle: double_quotes
|
1491
|
+
Enabled: true
|
1492
|
+
|
1493
|
+
Style/StringLiteralsInInterpolation:
|
1494
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings match the configured preference.
|
1495
|
+
Enabled: true
|
1496
|
+
|
1497
|
+
Style/StringMethods:
|
1498
|
+
Description: Checks if configured preferred methods are used over non-preferred.
|
1499
|
+
Enabled: false
|
1500
|
+
|
1501
|
+
Style/StructInheritance:
|
1502
|
+
Description: Checks for inheritance from Struct.new.
|
1503
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
1504
|
+
Enabled: false
|
1505
|
+
|
1506
|
+
Style/SymbolArray:
|
1507
|
+
Description: Use %i or %I for arrays of symbols.
|
1508
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
1509
|
+
Enabled: true
|
1510
|
+
|
1511
|
+
Style/SymbolLiteral:
|
1512
|
+
Description: Use plain symbols instead of string symbols when possible.
|
1513
|
+
Enabled: false
|
1514
|
+
|
1515
|
+
Style/SymbolProc:
|
1516
|
+
Description: Use symbols as procs instead of blocks when possible.
|
1517
|
+
Enabled: false
|
1518
|
+
|
1519
|
+
Style/TernaryParentheses:
|
1520
|
+
Description: Checks for use of parentheses around ternary conditions.
|
1521
|
+
Enabled: true
|
1522
|
+
|
1523
|
+
Style/MixinUsage:
|
1524
|
+
Description: Checks that `include`, `extend` and `prepend` exists at the top level.
|
1525
|
+
Enabled: true
|
1526
|
+
|
1527
|
+
Style/TrailingCommaInArguments:
|
1528
|
+
Description: Checks for trailing comma in argument lists.
|
1529
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
1530
|
+
Enabled: false
|
1531
|
+
|
1532
|
+
Style/TrailingCommaInArrayLiteral:
|
1533
|
+
Description: Checks for trailing comma in array and hash literals.'
|
1534
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
1535
|
+
Enabled: false
|
1536
|
+
|
1537
|
+
Style/TrailingCommaInHashLiteral:
|
1538
|
+
Description: Checks for trailing comma in array and hash literals.'
|
1539
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
1540
|
+
Enabled: false
|
1541
|
+
|
1542
|
+
Style/TrivialAccessors:
|
1543
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
1544
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
1545
|
+
Enabled: false
|
1546
|
+
|
1547
|
+
Style/UnlessElse:
|
1548
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
1549
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
1550
|
+
Enabled: true
|
1551
|
+
|
1552
|
+
Style/RedundantCapitalW:
|
1553
|
+
Description: Checks for %W when interpolation is not needed.
|
1554
|
+
Enabled: false
|
1555
|
+
|
1556
|
+
Style/RedundantInterpolation:
|
1557
|
+
Description: Checks for strings that are just an interpolated expression.
|
1558
|
+
Enabled: true
|
1559
|
+
|
1560
|
+
Style/RedundantPercentQ:
|
1561
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
1562
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
1563
|
+
Enabled: false
|
1564
|
+
|
1565
|
+
Style/TrailingUnderscoreVariable:
|
1566
|
+
Description: Checks for the usage of unneeded trailing underscores at the end of parallel variable assignment.
|
1567
|
+
AllowNamedUnderscoreVariables: true
|
1568
|
+
Enabled: false
|
1569
|
+
|
1570
|
+
Style/VariableInterpolation:
|
1571
|
+
Description: Don't interpolate global, instance and class variables directly in strings.
|
1572
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
1573
|
+
Enabled: true
|
1574
|
+
|
1575
|
+
Style/WhenThen:
|
1576
|
+
Description: Use when x then ... for one-line cases.
|
1577
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
1578
|
+
Enabled: true
|
1579
|
+
|
1580
|
+
Style/WhileUntilDo:
|
1581
|
+
Description: Checks for redundant do after while or until.
|
1582
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
1583
|
+
Enabled: true
|
1584
|
+
|
1585
|
+
Style/WhileUntilModifier:
|
1586
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
1587
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
1588
|
+
Enabled: true
|
1589
|
+
|
1590
|
+
Style/WordArray:
|
1591
|
+
Description: Use %w or %W for arrays of words.
|
1592
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
1593
|
+
Enabled: true
|
1594
|
+
|
1595
|
+
Style/YodaCondition:
|
1596
|
+
Description: Do not use literals as the first operand of a comparison.
|
1597
|
+
Reference: https://en.wikipedia.org/wiki/Yoda_conditions
|
1598
|
+
Enabled: true
|
1599
|
+
|
1600
|
+
Style/ZeroLengthPredicate:
|
1601
|
+
Description: Use #empty? when testing for objects of length 0.
|
1602
|
+
Enabled: true
|
1603
|
+
|
1604
|
+
Lint/RaiseException:
|
1605
|
+
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1606
|
+
Enabled: true
|
1607
|
+
Lint/StructNewOverride:
|
1608
|
+
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
1609
|
+
Enabled: true
|
1610
|
+
Style/HashEachMethods:
|
1611
|
+
Description: 'Use Hash#each_key and Hash#each_value.'
|
1612
|
+
Enabled: true
|
1613
|
+
Safe: false
|
1614
|
+
Style/HashTransformKeys:
|
1615
|
+
Description: 'Prefer `transform_keys` over `each_with_object` and `map`.'
|
1616
|
+
Enabled: true
|
1617
|
+
Safe: false
|
1618
|
+
Style/HashTransformValues:
|
1619
|
+
Description: 'Prefer `transform_values` over `each_with_object` and `map`.'
|
1620
|
+
Enabled: true
|
1621
|
+
Safe: false
|
1622
|
+
|
1623
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
1624
|
+
Enabled: true
|
1625
|
+
Lint/DeprecatedOpenSSLConstant:
|
1626
|
+
Enabled: true
|
1627
|
+
Style/SlicingWithRange:
|
1628
|
+
Enabled: true
|
1629
|
+
Lint/MixedRegexpCaptureTypes:
|
1630
|
+
Enabled: true
|
1631
|
+
Style/RedundantRegexpCharacterClass:
|
1632
|
+
Enabled: true
|
1633
|
+
Style/RedundantRegexpEscape:
|
1634
|
+
Enabled: true
|
1635
|
+
Lint/MissingSuper:
|
1636
|
+
Enabled: true
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
Lint/DuplicateElsifCondition:
|
1641
|
+
Enabled: true
|
1642
|
+
Lint/DuplicateRescueException:
|
1643
|
+
Enabled: true
|
1644
|
+
Lint/EmptyConditionalBody:
|
1645
|
+
Enabled: true
|
1646
|
+
Lint/FloatComparison:
|
1647
|
+
Enabled: true
|
1648
|
+
Lint/OutOfRangeRegexpRef:
|
1649
|
+
Enabled: true
|
1650
|
+
Lint/SelfAssignment:
|
1651
|
+
Enabled: true
|
1652
|
+
Lint/TopLevelReturnWithArgument:
|
1653
|
+
Enabled: true
|
1654
|
+
Lint/UnreachableLoop:
|
1655
|
+
Enabled: true
|
1656
|
+
Style/AccessorGrouping:
|
1657
|
+
Enabled: true
|
1658
|
+
Style/ArrayCoercion:
|
1659
|
+
Enabled: true
|
1660
|
+
Style/BisectedAttrAccessor:
|
1661
|
+
Enabled: true
|
1662
|
+
Style/CaseLikeIf:
|
1663
|
+
Enabled: true
|
1664
|
+
Style/ExplicitBlockArgument:
|
1665
|
+
Enabled: false
|
1666
|
+
Style/GlobalStdStream:
|
1667
|
+
Enabled: true
|
1668
|
+
Style/HashAsLastArrayItem:
|
1669
|
+
Enabled: false
|
1670
|
+
Style/HashLikeCase:
|
1671
|
+
Enabled: true
|
1672
|
+
Style/OptionalBooleanParameter:
|
1673
|
+
Enabled: true
|
1674
|
+
Style/RedundantAssignment:
|
1675
|
+
Enabled: true
|
1676
|
+
Style/RedundantFetchBlock:
|
1677
|
+
Enabled: true
|
1678
|
+
Style/RedundantFileExtensionInRequire:
|
1679
|
+
Enabled: true
|
1680
|
+
Style/SingleArgumentDig:
|
1681
|
+
Enabled: true
|
1682
|
+
Style/StringConcatenation:
|
1683
|
+
Enabled: true
|
1684
|
+
Performance/AncestorsInclude:
|
1685
|
+
Enabled: true
|
1686
|
+
Performance/BigDecimalWithNumericArgument:
|
1687
|
+
Enabled: true
|
1688
|
+
Performance/RedundantSortBlock:
|
1689
|
+
Enabled: true
|
1690
|
+
Performance/RedundantStringChars:
|
1691
|
+
Enabled: true
|
1692
|
+
Performance/ReverseFirst:
|
1693
|
+
Enabled: true
|
1694
|
+
Performance/SortReverse:
|
1695
|
+
Enabled: true
|
1696
|
+
Performance/Squeeze:
|
1697
|
+
Enabled: true
|
1698
|
+
Performance/StringInclude:
|
1699
|
+
Enabled: true
|
1700
|
+
Rails/ActiveRecordCallbacksOrder:
|
1701
|
+
Enabled: true
|
1702
|
+
Rails/FindById:
|
1703
|
+
Enabled: true
|
1704
|
+
Rails/Inquiry:
|
1705
|
+
Enabled: false
|
1706
|
+
Rails/MailerName:
|
1707
|
+
Enabled: true
|
1708
|
+
Rails/MatchRoute:
|
1709
|
+
Enabled: true
|
1710
|
+
Rails/NegateInclude:
|
1711
|
+
Enabled: true
|
1712
|
+
Rails/Pluck:
|
1713
|
+
Enabled: true
|
1714
|
+
Rails/PluckInWhere:
|
1715
|
+
Enabled: true
|
1716
|
+
Rails/RenderInline:
|
1717
|
+
Enabled: true
|
1718
|
+
Rails/RenderPlainText:
|
1719
|
+
Enabled: true
|
1720
|
+
Rails/ShortI18n:
|
1721
|
+
Enabled: true
|
1722
|
+
Rails/WhereExists:
|
1723
|
+
Enabled: true
|
1724
|
+
Rails/SkipsModelValidations:
|
1725
|
+
Enabled: false
|
1726
|
+
Rails/UniqueValidationWithoutIndex:
|
1727
|
+
Enabled: false
|
1728
|
+
Rails/InverseOf:
|
1729
|
+
Enabled: false
|
1730
|
+
Rails/LexicallyScopedActionFilter:
|
1731
|
+
Enabled: false
|
1732
|
+
Minitest/MultipleAssertions:
|
1733
|
+
Enabled: false
|
1734
|
+
Rails/OutputSafety:
|
1735
|
+
Enabled: false
|