rubocop_config 0.49.1.1 → 0.57.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +2 -1
- data/.rubocop.yml +847 -268
- data/bin/publish +60 -0
- data/config/default.yml +1189 -314
- data/lib/rubocop_config/runner.rb +1 -1
- data/lib/rubocop_config/version.rb +1 -1
- data/rubocop_config.gemspec +3 -4
- metadata +15 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0b685be347652eb4680ae797332ff8ccd1980545d17e2f8fcb57f5b19bf5715a
|
|
4
|
+
data.tar.gz: 60b0704b83059eede201afe55f36d5af7cdc9889f60a5f3379cd54183a718e87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ded52822d788be928824aaf52500760b190c896ef4d97ea8581b1de023efa02120dfdd17ab4f4887b9998a115fa692121d40af0d5f0deed83e5d1101d2a26ba1
|
|
7
|
+
data.tar.gz: 8cd6c8ea21f4a94605f801da01aec7d4dd1adc3f59f426f7eb51817d915f5a1cb9be4f282d18973866fc201bccfa28a57dfef0adc30dece214851ad1e454cdc1
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -4,44 +4,331 @@ AllCops:
|
|
|
4
4
|
- vendor/**/*
|
|
5
5
|
- Gemfile.lock
|
|
6
6
|
- db/schema.rb
|
|
7
|
+
- node_modules/**/*
|
|
7
8
|
TargetRubyVersion: 2.4
|
|
9
|
+
Bundler/DuplicatedGem:
|
|
10
|
+
Description: Checks for duplicate gem entries in Gemfile.
|
|
11
|
+
Enabled: true
|
|
12
|
+
Bundler/InsecureProtocolSource:
|
|
13
|
+
Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
|
|
14
|
+
because HTTP requests are insecure. Please change your source to 'https://rubygems.org'
|
|
15
|
+
if possible, or 'http://rubygems.org' if not.
|
|
16
|
+
Enabled: true
|
|
17
|
+
Bundler/OrderedGems:
|
|
18
|
+
Description: Gems within groups in the Gemfile should be alphabetically sorted.
|
|
19
|
+
Enabled: true
|
|
20
|
+
Gemspec/OrderedDependencies:
|
|
21
|
+
Description: Dependencies in the gemspec should be alphabetically sorted.
|
|
22
|
+
Enabled: true
|
|
23
|
+
Layout/AccessModifierIndentation:
|
|
24
|
+
Description: Check indentation of private/protected visibility modifiers.
|
|
25
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
|
26
|
+
Enabled: false
|
|
27
|
+
Layout/AlignArray:
|
|
28
|
+
Description: Align the elements of an array literal if they span more than one line.
|
|
29
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
|
30
|
+
Enabled: true
|
|
31
|
+
Layout/AlignHash:
|
|
32
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
|
33
|
+
Enabled: true
|
|
34
|
+
Layout/AlignParameters:
|
|
35
|
+
Description: Align the parameters of a method call if they span more than one line.
|
|
36
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
|
37
|
+
Enabled: true
|
|
38
|
+
Layout/BlockAlignment:
|
|
39
|
+
Description: Align block ends correctly.
|
|
40
|
+
Enabled: true
|
|
41
|
+
Layout/BlockEndNewline:
|
|
42
|
+
Description: Put end statement of multiline block on its own line.
|
|
43
|
+
Enabled: true
|
|
44
|
+
Layout/CaseIndentation:
|
|
45
|
+
Description: Indentation of when in a case/when/[else/]end.
|
|
46
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
|
47
|
+
Enabled: true
|
|
48
|
+
Layout/ClosingParenthesisIndentation:
|
|
49
|
+
Description: Checks the indentation of hanging closing parentheses.
|
|
50
|
+
Enabled: false
|
|
51
|
+
Layout/CommentIndentation:
|
|
52
|
+
Description: Indentation of comments.
|
|
53
|
+
Enabled: false
|
|
54
|
+
Layout/ConditionPosition:
|
|
55
|
+
Description: Checks for condition placed in a confusing position relative to the
|
|
56
|
+
keyword.
|
|
57
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
|
58
|
+
Enabled: true
|
|
59
|
+
Layout/DefEndAlignment:
|
|
60
|
+
Description: Align ends corresponding to defs correctly.
|
|
61
|
+
Enabled: true
|
|
62
|
+
Layout/DotPosition:
|
|
63
|
+
Description: Checks the position of the dot in multi-line method calls.
|
|
64
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
|
65
|
+
Enabled: true
|
|
66
|
+
Layout/ElseAlignment:
|
|
67
|
+
Description: Align elses and elsifs correctly.
|
|
68
|
+
Enabled: true
|
|
69
|
+
Layout/EmptyLineBetweenDefs:
|
|
70
|
+
Description: Use empty lines between defs.
|
|
71
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
|
72
|
+
Enabled: true
|
|
73
|
+
Layout/EmptyLines:
|
|
74
|
+
Description: Don't use several empty lines in a row.
|
|
75
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines
|
|
76
|
+
Enabled: true
|
|
77
|
+
Layout/EmptyLinesAroundAccessModifier:
|
|
78
|
+
Description: Keep blank lines around access modifiers.
|
|
79
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-access-modifier
|
|
80
|
+
Enabled: false
|
|
81
|
+
Layout/EmptyLinesAroundBeginBody:
|
|
82
|
+
Description: Keeps track of empty lines around begin-end bodies.
|
|
83
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
84
|
+
Enabled: false
|
|
85
|
+
Layout/EmptyLinesAroundBlockBody:
|
|
86
|
+
Description: Keeps track of empty lines around block bodies.
|
|
87
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
88
|
+
Enabled: false
|
|
89
|
+
Layout/EmptyLinesAroundClassBody:
|
|
90
|
+
Description: Keeps track of empty lines around class bodies.
|
|
91
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
92
|
+
Enabled: false
|
|
93
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
|
94
|
+
Description: Keeps track of empty lines around exception handling keywords.
|
|
95
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
96
|
+
Enabled: false
|
|
97
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
98
|
+
Description: Keeps track of empty lines around module bodies.
|
|
99
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
100
|
+
Enabled: false
|
|
101
|
+
Layout/EmptyLinesAroundMethodBody:
|
|
102
|
+
Description: Keeps track of empty lines around method bodies.
|
|
103
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
|
104
|
+
Enabled: false
|
|
105
|
+
Layout/EndAlignment:
|
|
106
|
+
Description: Align ends correctly.
|
|
107
|
+
Enabled: true
|
|
108
|
+
Layout/EndOfLine:
|
|
109
|
+
Description: Use Unix-style line endings.
|
|
110
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
|
111
|
+
Enabled: false
|
|
112
|
+
Layout/ExtraSpacing:
|
|
113
|
+
Description: Do not use unnecessary spacing.
|
|
114
|
+
Enabled: true
|
|
115
|
+
Layout/FirstArrayElementLineBreak:
|
|
116
|
+
Description: Checks for a line break before the first element in a multi-line array.
|
|
117
|
+
Enabled: false
|
|
118
|
+
Layout/FirstHashElementLineBreak:
|
|
119
|
+
Description: Checks for a line break before the first element in a multi-line hash.
|
|
120
|
+
Enabled: false
|
|
121
|
+
Layout/FirstMethodArgumentLineBreak:
|
|
122
|
+
Description: Checks for a line break before the first argument in a multi-line method
|
|
123
|
+
call.
|
|
124
|
+
Enabled: false
|
|
125
|
+
Layout/FirstMethodParameterLineBreak:
|
|
126
|
+
Description: Checks for a line break before the first parameter in a multi-line
|
|
127
|
+
method parameter definition.
|
|
128
|
+
Enabled: false
|
|
129
|
+
Layout/InitialIndentation:
|
|
130
|
+
Description: Checks the indentation of the first non-blank non-comment line in a
|
|
131
|
+
file.
|
|
132
|
+
Enabled: false
|
|
133
|
+
Layout/FirstParameterIndentation:
|
|
134
|
+
Description: Checks the indentation of the first parameter in a method call.
|
|
135
|
+
Enabled: false
|
|
136
|
+
Layout/IndentationConsistency:
|
|
137
|
+
Description: Keep indentation straight.
|
|
138
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
|
139
|
+
Enabled: false
|
|
140
|
+
Layout/IndentationWidth:
|
|
141
|
+
Description: Use 2 spaces for indentation.
|
|
142
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
|
143
|
+
Enabled: true
|
|
144
|
+
Layout/IndentArray:
|
|
145
|
+
Description: Checks the indentation of the first element in an array literal.
|
|
146
|
+
Enabled: false
|
|
147
|
+
Layout/IndentAssignment:
|
|
148
|
+
Description: Checks the indentation of the first line of the right-hand-side of
|
|
149
|
+
a multi-line assignment.
|
|
150
|
+
Enabled: true
|
|
151
|
+
Layout/IndentHash:
|
|
152
|
+
Description: Checks the indentation of the first key in a hash literal.
|
|
153
|
+
Enabled: false
|
|
154
|
+
Layout/IndentHeredoc:
|
|
155
|
+
Description: This cops checks the indentation of the here document bodies.
|
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#squiggly-heredocs
|
|
157
|
+
Enabled: true
|
|
158
|
+
Layout/SpaceInLambdaLiteral:
|
|
159
|
+
Description: Checks for spaces in lambda literals.
|
|
160
|
+
Enabled: true
|
|
161
|
+
Layout/LeadingCommentSpace:
|
|
162
|
+
Description: Comments should start with a space.
|
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
|
164
|
+
Enabled: true
|
|
165
|
+
Layout/MultilineArrayBraceLayout:
|
|
166
|
+
Description: Checks that the closing brace in an array literal is either on the
|
|
167
|
+
same line as the last array element, or a new line.
|
|
168
|
+
Enabled: true
|
|
169
|
+
Layout/MultilineAssignmentLayout:
|
|
170
|
+
Description: Check for a newline after the assignment operator in multi-line assignments.
|
|
171
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guid#indent-conditional-assignment
|
|
172
|
+
Enabled: false
|
|
173
|
+
Layout/MultilineBlockLayout:
|
|
174
|
+
Description: Ensures newlines after multiline block do statements.
|
|
175
|
+
Enabled: true
|
|
176
|
+
Layout/MultilineHashBraceLayout:
|
|
177
|
+
Description: Checks that the closing brace in a hash literal is either on the same
|
|
178
|
+
line as the last hash element, or a new line.
|
|
179
|
+
Enabled: true
|
|
180
|
+
Layout/MultilineMethodCallBraceLayout:
|
|
181
|
+
Description: Checks that the closing brace in a method call is either on the same
|
|
182
|
+
line as the last method argument, or a new line.
|
|
183
|
+
Enabled: true
|
|
184
|
+
Layout/MultilineMethodCallIndentation:
|
|
185
|
+
Description: Checks indentation of method calls with the dot operator that span
|
|
186
|
+
more than one line.
|
|
187
|
+
Enabled: true
|
|
188
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
|
189
|
+
Description: Checks that the closing brace in a method definition is either on the
|
|
190
|
+
same line as the last method parameter, or a new line.
|
|
191
|
+
Enabled: true
|
|
192
|
+
Layout/MultilineOperationIndentation:
|
|
193
|
+
Description: Checks indentation of binary operations that span more than one line.
|
|
194
|
+
Enabled: false
|
|
195
|
+
Layout/EmptyLineAfterMagicComment:
|
|
196
|
+
Description: Add an empty line after magic comments to separate them from code.
|
|
197
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code
|
|
198
|
+
Enabled: true
|
|
199
|
+
Layout/RescueEnsureAlignment:
|
|
200
|
+
Description: Align rescues and ensures correctly.
|
|
201
|
+
Enabled: false
|
|
202
|
+
Layout/SpaceBeforeFirstArg:
|
|
203
|
+
Description: Checks that exactly one space is used between a method name and the
|
|
204
|
+
first argument for method calls without parentheses.
|
|
205
|
+
Enabled: true
|
|
206
|
+
Layout/SpaceAfterColon:
|
|
207
|
+
Description: Use spaces after colons.
|
|
208
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
209
|
+
Enabled: true
|
|
210
|
+
Layout/SpaceAfterComma:
|
|
211
|
+
Description: Use spaces after commas.
|
|
212
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
213
|
+
Enabled: true
|
|
214
|
+
Layout/SpaceAfterMethodName:
|
|
215
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
|
216
|
+
in a method definition.
|
|
217
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
|
218
|
+
Enabled: true
|
|
219
|
+
Layout/SpaceAfterNot:
|
|
220
|
+
Description: Tracks redundant space after the ! operator.
|
|
221
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
|
222
|
+
Enabled: false
|
|
223
|
+
Layout/SpaceAfterSemicolon:
|
|
224
|
+
Description: Use spaces after semicolons.
|
|
225
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
226
|
+
Enabled: true
|
|
227
|
+
Layout/SpaceBeforeBlockBraces:
|
|
228
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
|
229
|
+
Enabled: false
|
|
230
|
+
Layout/SpaceBeforeComma:
|
|
231
|
+
Description: No spaces before commas.
|
|
232
|
+
Enabled: false
|
|
233
|
+
Layout/SpaceBeforeComment:
|
|
234
|
+
Description: Checks for missing space between code and a comment on the same line.
|
|
235
|
+
Enabled: false
|
|
236
|
+
Layout/SpaceBeforeSemicolon:
|
|
237
|
+
Description: No spaces before semicolons.
|
|
238
|
+
Enabled: false
|
|
239
|
+
Layout/SpaceInsideBlockBraces:
|
|
240
|
+
Description: Checks that block braces have or don't have surrounding space. For
|
|
241
|
+
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
|
242
|
+
space.
|
|
243
|
+
Enabled: false
|
|
244
|
+
Layout/SpaceAroundBlockParameters:
|
|
245
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
|
246
|
+
Enabled: true
|
|
247
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
248
|
+
Description: Checks that the equals signs in parameter default assignments have
|
|
249
|
+
or don't have surrounding space depending on configuration.
|
|
250
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
|
251
|
+
Enabled: true
|
|
252
|
+
Layout/SpaceAroundKeyword:
|
|
253
|
+
Description: Use a space around keywords if appropriate.
|
|
254
|
+
Enabled: true
|
|
255
|
+
Layout/SpaceAroundOperators:
|
|
256
|
+
Description: Use a single space around operators.
|
|
257
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
258
|
+
Enabled: true
|
|
259
|
+
Layout/SpaceInsideArrayPercentLiteral:
|
|
260
|
+
Description: No unnecessary additional spaces between elements in %i/%w literals.
|
|
261
|
+
Enabled: true
|
|
262
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
263
|
+
Description: No unnecessary spaces inside delimiters of %i/%w/%x literals.
|
|
264
|
+
Enabled: true
|
|
265
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
266
|
+
Description: Use spaces inside hash literal braces - or don't.
|
|
267
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
268
|
+
Enabled: true
|
|
269
|
+
Layout/SpaceInsideParens:
|
|
270
|
+
Description: No spaces after ( or before ).
|
|
271
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
|
272
|
+
Enabled: true
|
|
273
|
+
Layout/SpaceInsideRangeLiteral:
|
|
274
|
+
Description: No spaces inside range literals.
|
|
275
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
|
276
|
+
Enabled: true
|
|
277
|
+
Layout/SpaceInsideStringInterpolation:
|
|
278
|
+
Description: Checks for padding/surrounding spaces inside string interpolation.
|
|
279
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
|
280
|
+
Enabled: false
|
|
281
|
+
Layout/Tab:
|
|
282
|
+
Description: No hard tabs.
|
|
283
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
|
284
|
+
Enabled: false
|
|
285
|
+
Layout/TrailingBlankLines:
|
|
286
|
+
Description: Checks trailing blank lines and final newline.
|
|
287
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
|
288
|
+
Enabled: false
|
|
289
|
+
Layout/TrailingWhitespace:
|
|
290
|
+
Description: Avoid trailing whitespace.
|
|
291
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
|
292
|
+
Enabled: false
|
|
293
|
+
Lint/AmbiguousBlockAssociation:
|
|
294
|
+
Description: Checks for ambiguous block association with method when param passed
|
|
295
|
+
without parentheses.
|
|
296
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#syntax
|
|
297
|
+
Enabled: false
|
|
8
298
|
Lint/AmbiguousOperator:
|
|
9
299
|
Description: Checks for ambiguous operators in the first argument of a method invocation
|
|
10
300
|
without parentheses.
|
|
11
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
|
301
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
|
12
302
|
Enabled: true
|
|
13
|
-
Lint/AmbiguousBlockAssociation:
|
|
14
|
-
Enabled: false
|
|
15
303
|
Lint/AmbiguousRegexpLiteral:
|
|
16
304
|
Description: Checks for ambiguous regexp literals in the first argument of a method
|
|
17
|
-
invocation without
|
|
305
|
+
invocation without parentheses.
|
|
18
306
|
Enabled: true
|
|
19
307
|
Lint/AssignmentInCondition:
|
|
20
308
|
Description: Don't use assignment in conditions.
|
|
21
309
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
|
22
310
|
Enabled: true
|
|
23
|
-
Lint/
|
|
24
|
-
Description:
|
|
311
|
+
Lint/BooleanSymbol:
|
|
312
|
+
Description: Check for `:true` and `:false` symbols.
|
|
25
313
|
Enabled: true
|
|
26
314
|
Lint/CircularArgumentReference:
|
|
27
|
-
Description:
|
|
28
|
-
|
|
29
|
-
Lint/ConditionPosition:
|
|
30
|
-
Description: Checks for condition placed in a confusing position relative to the
|
|
31
|
-
keyword.
|
|
32
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
|
315
|
+
Description: Default values in optional keyword arguments and optional ordinal arguments
|
|
316
|
+
should not refer back to the name of the argument.
|
|
33
317
|
Enabled: true
|
|
34
318
|
Lint/Debugger:
|
|
35
319
|
Description: Check for debugger calls.
|
|
36
320
|
Enabled: true
|
|
37
|
-
Lint/DefEndAlignment:
|
|
38
|
-
Description: Align ends corresponding to defs correctly.
|
|
39
|
-
Enabled: true
|
|
40
321
|
Lint/DeprecatedClassMethods:
|
|
41
322
|
Description: Check for deprecated class method calls.
|
|
42
323
|
Enabled: true
|
|
324
|
+
Lint/DuplicateCaseCondition:
|
|
325
|
+
Description: Do not repeat values in case conditionals.
|
|
326
|
+
Enabled: true
|
|
43
327
|
Lint/DuplicateMethods:
|
|
44
|
-
Description: Check for duplicate
|
|
328
|
+
Description: Check for duplicate method definitions.
|
|
329
|
+
Enabled: true
|
|
330
|
+
Lint/DuplicatedKey:
|
|
331
|
+
Description: Check for duplicate keys in hash literals.
|
|
45
332
|
Enabled: true
|
|
46
333
|
Lint/EachWithObjectArgument:
|
|
47
334
|
Description: Check for immutable argument given to each_with_object.
|
|
@@ -52,11 +339,15 @@ Lint/ElseLayout:
|
|
|
52
339
|
Lint/EmptyEnsure:
|
|
53
340
|
Description: Checks for empty ensure block.
|
|
54
341
|
Enabled: true
|
|
342
|
+
AutoCorrect: false
|
|
343
|
+
Lint/EmptyExpression:
|
|
344
|
+
Description: Checks for empty expressions.
|
|
345
|
+
Enabled: true
|
|
55
346
|
Lint/EmptyInterpolation:
|
|
56
347
|
Description: Checks for empty string interpolation.
|
|
57
348
|
Enabled: true
|
|
58
|
-
Lint/
|
|
59
|
-
Description:
|
|
349
|
+
Lint/EmptyWhen:
|
|
350
|
+
Description: Checks for `when` branches with empty bodies.
|
|
60
351
|
Enabled: true
|
|
61
352
|
Lint/EndInMethod:
|
|
62
353
|
Description: END blocks should not be placed inside method definitions.
|
|
@@ -65,6 +356,9 @@ Lint/EnsureReturn:
|
|
|
65
356
|
Description: Do not use return in an ensure block.
|
|
66
357
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
|
67
358
|
Enabled: true
|
|
359
|
+
Lint/FloatOutOfRange:
|
|
360
|
+
Description: Catches floating-point literals too large or small for Ruby to represent.
|
|
361
|
+
Enabled: true
|
|
68
362
|
Lint/FormatParameterMismatch:
|
|
69
363
|
Description: The number of parameters to format/sprint must match the fields.
|
|
70
364
|
Enabled: true
|
|
@@ -72,11 +366,21 @@ Lint/HandleExceptions:
|
|
|
72
366
|
Description: Don't suppress exception.
|
|
73
367
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
|
74
368
|
Enabled: true
|
|
75
|
-
Lint/
|
|
76
|
-
Description: Checks for
|
|
77
|
-
|
|
369
|
+
Lint/ImplicitStringConcatenation:
|
|
370
|
+
Description: Checks for adjacent string literals on the same line, which could better
|
|
371
|
+
be represented as a single string literal.
|
|
372
|
+
Enabled: true
|
|
373
|
+
Lint/IneffectiveAccessModifier:
|
|
374
|
+
Description: Checks for attempts to use `private` or `protected` to set the visibility
|
|
375
|
+
of a class method, which does not work.
|
|
78
376
|
Enabled: true
|
|
79
|
-
Lint/
|
|
377
|
+
Lint/InheritException:
|
|
378
|
+
Description: Avoid inheriting from the `Exception` class.
|
|
379
|
+
Enabled: true
|
|
380
|
+
Lint/InterpolationCheck:
|
|
381
|
+
Description: Raise warning for interpolation in single q strs
|
|
382
|
+
Enabled: true
|
|
383
|
+
Lint/LiteralAsCondition:
|
|
80
384
|
Description: Checks of literals used in conditions.
|
|
81
385
|
Enabled: true
|
|
82
386
|
Lint/LiteralInInterpolation:
|
|
@@ -87,10 +391,17 @@ Lint/Loop:
|
|
|
87
391
|
for post-loop tests.
|
|
88
392
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
|
89
393
|
Enabled: true
|
|
394
|
+
Lint/MultipleCompare:
|
|
395
|
+
Description: Use `&&` operator to compare multiple value.
|
|
396
|
+
Enabled: true
|
|
90
397
|
Lint/NestedMethodDefinition:
|
|
91
398
|
Description: Do not use nested method definitions.
|
|
92
399
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
|
93
400
|
Enabled: true
|
|
401
|
+
Lint/NextWithoutAccumulator:
|
|
402
|
+
Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
|
|
403
|
+
block.
|
|
404
|
+
Enabled: true
|
|
94
405
|
Lint/NonLocalExitFromIterator:
|
|
95
406
|
Description: Do not use return in iterator to cause non-local exit.
|
|
96
407
|
Enabled: true
|
|
@@ -98,6 +409,26 @@ Lint/ParenthesesAsGroupedExpression:
|
|
|
98
409
|
Description: Checks for method calls with a space before the opening parenthesis.
|
|
99
410
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
|
100
411
|
Enabled: true
|
|
412
|
+
Lint/PercentStringArray:
|
|
413
|
+
Description: Checks for unwanted commas and quotes in %w/%W literals.
|
|
414
|
+
Enabled: true
|
|
415
|
+
Lint/PercentSymbolArray:
|
|
416
|
+
Description: Checks for unwanted commas and colons in %i/%I literals.
|
|
417
|
+
Enabled: true
|
|
418
|
+
Lint/RandOne:
|
|
419
|
+
Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely
|
|
420
|
+
a mistake.
|
|
421
|
+
Enabled: true
|
|
422
|
+
Lint/RedundantWithIndex:
|
|
423
|
+
Description: Checks for redundant `with_index`.
|
|
424
|
+
Enabled: true
|
|
425
|
+
Lint/RedundantWithObject:
|
|
426
|
+
Description: Checks for redundant `with_object`.
|
|
427
|
+
Enabled: true
|
|
428
|
+
Lint/RegexpAsCondition:
|
|
429
|
+
Description: Do not use regexp literal as a condition. The regexp literal matches
|
|
430
|
+
`$_` implicitly.
|
|
431
|
+
Enabled: true
|
|
101
432
|
Lint/RequireParentheses:
|
|
102
433
|
Description: Use parentheses in the method call to avoid confusion about precedence.
|
|
103
434
|
Enabled: true
|
|
@@ -105,6 +436,18 @@ Lint/RescueException:
|
|
|
105
436
|
Description: Avoid rescuing the Exception class.
|
|
106
437
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
|
107
438
|
Enabled: true
|
|
439
|
+
Lint/RescueType:
|
|
440
|
+
Description: Avoid rescuing from non constants that could result in a `TypeError`.
|
|
441
|
+
Enabled: true
|
|
442
|
+
Lint/SafeNavigationChain:
|
|
443
|
+
Description: Do not chain ordinary method call after safe navigation operator.
|
|
444
|
+
Enabled: true
|
|
445
|
+
Lint/ScriptPermission:
|
|
446
|
+
Description: Grant script file execute permission.
|
|
447
|
+
Enabled: true
|
|
448
|
+
Lint/ShadowedException:
|
|
449
|
+
Description: Avoid rescuing a higher level exception before a lower level exception.
|
|
450
|
+
Enabled: true
|
|
108
451
|
Lint/ShadowingOuterLocalVariable:
|
|
109
452
|
Description: Do not use the same name as outer local variable for block arguments
|
|
110
453
|
or block local variables.
|
|
@@ -113,12 +456,20 @@ Lint/StringConversionInInterpolation:
|
|
|
113
456
|
Description: Checks for Object#to_s usage in string interpolation.
|
|
114
457
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
|
115
458
|
Enabled: true
|
|
459
|
+
Lint/Syntax:
|
|
460
|
+
Description: Checks syntax error
|
|
461
|
+
Enabled: true
|
|
116
462
|
Lint/UnderscorePrefixedVariableName:
|
|
117
463
|
Description: Do not use prefix `_` for a variable that is used.
|
|
118
464
|
Enabled: true
|
|
119
|
-
Lint/
|
|
120
|
-
Description:
|
|
121
|
-
|
|
465
|
+
Lint/UnifiedInteger:
|
|
466
|
+
Description: Use Integer instead of Fixnum or Bignum
|
|
467
|
+
Enabled: true
|
|
468
|
+
Lint/UnneededRequireStatement:
|
|
469
|
+
Description: Checks for unnecessary `require` statement.
|
|
470
|
+
Enabled: true
|
|
471
|
+
Lint/UnneededSplatExpansion:
|
|
472
|
+
Description: Checks for splat unnecessarily being called on literals
|
|
122
473
|
Enabled: true
|
|
123
474
|
Lint/UnusedBlockArgument:
|
|
124
475
|
Description: Checks for unused block arguments.
|
|
@@ -131,9 +482,21 @@ Lint/UnusedMethodArgument:
|
|
|
131
482
|
Lint/UnreachableCode:
|
|
132
483
|
Description: Unreachable code.
|
|
133
484
|
Enabled: true
|
|
485
|
+
Lint/UriEscapeUnescape:
|
|
486
|
+
Description: "`URI.escape` method is obsolete and should not be used. Instead, use
|
|
487
|
+
`CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending
|
|
488
|
+
on your specific use case. Also `URI.unescape` method is obsolete and should not
|
|
489
|
+
be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component`
|
|
490
|
+
depending on your specific use case."
|
|
491
|
+
Enabled: true
|
|
492
|
+
Lint/UriRegexp:
|
|
493
|
+
Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
|
|
494
|
+
Enabled: true
|
|
134
495
|
Lint/UselessAccessModifier:
|
|
135
496
|
Description: Checks for useless access modifiers.
|
|
136
497
|
Enabled: true
|
|
498
|
+
ContextCreatingMethods: []
|
|
499
|
+
MethodCreatingMethods: []
|
|
137
500
|
Lint/UselessAssignment:
|
|
138
501
|
Description: Checks for useless assignment to a local variable.
|
|
139
502
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
|
@@ -144,6 +507,9 @@ Lint/UselessComparison:
|
|
|
144
507
|
Lint/UselessElseWithoutRescue:
|
|
145
508
|
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
|
146
509
|
Enabled: true
|
|
510
|
+
Lint/ReturnInVoidContext:
|
|
511
|
+
Description: Checks for return in void context.
|
|
512
|
+
Enabled: true
|
|
147
513
|
Lint/UselessSetterCall:
|
|
148
514
|
Description: Checks for useless setter call to a local variable.
|
|
149
515
|
Enabled: true
|
|
@@ -156,6 +522,13 @@ Metrics/AbcSize:
|
|
|
156
522
|
Reference: http://c2.com/cgi/wiki?AbcMetric
|
|
157
523
|
Enabled: true
|
|
158
524
|
Max: 15
|
|
525
|
+
Metrics/BlockLength:
|
|
526
|
+
Description: Avoid long blocks with many lines.
|
|
527
|
+
Enabled: true
|
|
528
|
+
Exclude:
|
|
529
|
+
- Rakefile
|
|
530
|
+
- "**/*.rake"
|
|
531
|
+
- spec/**/*.rb
|
|
159
532
|
Metrics/BlockNesting:
|
|
160
533
|
Description: Avoid excessive block nesting
|
|
161
534
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
|
@@ -171,7 +544,7 @@ Metrics/CyclomaticComplexity:
|
|
|
171
544
|
Enabled: true
|
|
172
545
|
Metrics/LineLength:
|
|
173
546
|
Description: Limit lines to 80 characters.
|
|
174
|
-
StyleGuide:
|
|
547
|
+
StyleGuide: "#80-character-limits"
|
|
175
548
|
Enabled: true
|
|
176
549
|
Metrics/MethodLength:
|
|
177
550
|
Description: Avoid methods longer than 10 lines of code.
|
|
@@ -190,19 +563,87 @@ Metrics/PerceivedComplexity:
|
|
|
190
563
|
Description: A complexity metric geared towards measuring complexity for a human
|
|
191
564
|
reader.
|
|
192
565
|
Enabled: true
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
|
|
566
|
+
Naming/AccessorMethodName:
|
|
567
|
+
Description: Check the naming of accessor methods for get_/set_.
|
|
568
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names
|
|
569
|
+
Enabled: false
|
|
570
|
+
Naming/AsciiIdentifiers:
|
|
571
|
+
Description: Use only ascii symbols in identifiers.
|
|
572
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
|
573
|
+
Enabled: false
|
|
574
|
+
Naming/ClassAndModuleCamelCase:
|
|
575
|
+
Description: Use CamelCase for classes and modules.
|
|
576
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
|
577
|
+
Enabled: true
|
|
578
|
+
Naming/ConstantName:
|
|
579
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
|
580
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
|
581
|
+
Enabled: true
|
|
582
|
+
Naming/FileName:
|
|
583
|
+
Description: Use snake_case for source file names.
|
|
584
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
|
585
|
+
Enabled: true
|
|
586
|
+
Naming/HeredocDelimiterCase:
|
|
587
|
+
Description: Use configured case for heredoc delimiters.
|
|
588
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
|
589
|
+
Enabled: true
|
|
590
|
+
Naming/HeredocDelimiterNaming:
|
|
591
|
+
Description: Use descriptive heredoc delimiters.
|
|
592
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
|
593
|
+
Enabled: true
|
|
594
|
+
Naming/MethodName:
|
|
595
|
+
Description: Use the configured style when naming methods.
|
|
596
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
|
597
|
+
Enabled: false
|
|
598
|
+
Naming/PredicateName:
|
|
599
|
+
Description: Check the names of predicate methods.
|
|
600
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
|
601
|
+
Enabled: true
|
|
602
|
+
Naming/BinaryOperatorParameterName:
|
|
603
|
+
Description: When defining binary operators, name the argument other.
|
|
604
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
|
605
|
+
Enabled: true
|
|
606
|
+
Naming/VariableName:
|
|
607
|
+
Description: Use the configured style when naming variables.
|
|
608
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
|
609
|
+
Enabled: true
|
|
610
|
+
Naming/VariableNumber:
|
|
611
|
+
Description: Use the configured style when numbering variables.
|
|
612
|
+
Enabled: true
|
|
613
|
+
Performance/Caller:
|
|
614
|
+
Description: Use `caller(n..n)` instead of `caller`.
|
|
615
|
+
Enabled: true
|
|
616
|
+
Performance/Casecmp:
|
|
617
|
+
Description: Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`,
|
|
618
|
+
or `== upcase`..
|
|
619
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
|
|
620
|
+
Enabled: true
|
|
621
|
+
Performance/CaseWhenSplat:
|
|
622
|
+
Description: Place `when` conditions that use splat at the end of the list of `when`
|
|
623
|
+
branches.
|
|
624
|
+
Enabled: true
|
|
198
625
|
Performance/Count:
|
|
199
626
|
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
|
|
200
627
|
`reject...count`, `select...length`, and `reject...length`.
|
|
628
|
+
SafeMode: true
|
|
201
629
|
Enabled: true
|
|
202
630
|
Performance/Detect:
|
|
203
631
|
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
|
|
204
632
|
and `find_all.last`.
|
|
205
633
|
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
|
|
634
|
+
SafeMode: true
|
|
635
|
+
Enabled: true
|
|
636
|
+
Performance/DoubleStartEndWith:
|
|
637
|
+
Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x,
|
|
638
|
+
...) || str.{start,end}_with?(y, ...)`.
|
|
639
|
+
Enabled: true
|
|
640
|
+
Performance/EndWith:
|
|
641
|
+
Description: Use `end_with?` instead of a regex match anchored to the end of a string.
|
|
642
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
|
643
|
+
AutoCorrect: false
|
|
644
|
+
Enabled: true
|
|
645
|
+
Performance/FixedSize:
|
|
646
|
+
Description: Do not compute the size of statically sized objects except in constants
|
|
206
647
|
Enabled: true
|
|
207
648
|
Performance/FlatMap:
|
|
208
649
|
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
|
|
@@ -210,12 +651,38 @@ Performance/FlatMap:
|
|
|
210
651
|
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
|
211
652
|
Enabled: true
|
|
212
653
|
EnabledForFlattenWithoutParams: false
|
|
654
|
+
Performance/LstripRstrip:
|
|
655
|
+
Description: Use `strip` instead of `lstrip.rstrip`.
|
|
656
|
+
Enabled: true
|
|
657
|
+
Performance/RangeInclude:
|
|
658
|
+
Description: Use `Range#cover?` instead of `Range#include?`.
|
|
659
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
|
|
660
|
+
Enabled: true
|
|
661
|
+
Performance/RedundantBlockCall:
|
|
662
|
+
Description: Use `yield` instead of `block.call`.
|
|
663
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
|
|
664
|
+
Enabled: true
|
|
665
|
+
Performance/RedundantMatch:
|
|
666
|
+
Description: Use `=~` instead of `String#match` or `Regexp#match` in a context where
|
|
667
|
+
the returned `MatchData` is not needed.
|
|
668
|
+
Enabled: true
|
|
669
|
+
Performance/RedundantMerge:
|
|
670
|
+
Description: Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
|
|
671
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
|
|
672
|
+
Enabled: true
|
|
673
|
+
Performance/RedundantSortBy:
|
|
674
|
+
Description: Use `sort` instead of `sort_by { |x| x }`.
|
|
675
|
+
Enabled: true
|
|
676
|
+
Performance/RegexpMatch:
|
|
677
|
+
Description: Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`,
|
|
678
|
+
`Regexp#===`, or `=~` when `MatchData` is not used.
|
|
679
|
+
Enabled: true
|
|
213
680
|
Performance/ReverseEach:
|
|
214
681
|
Description: Use `reverse_each` instead of `reverse.each`.
|
|
215
682
|
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
|
216
683
|
Enabled: true
|
|
217
684
|
Performance/Sample:
|
|
218
|
-
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[
|
|
685
|
+
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.
|
|
219
686
|
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
|
220
687
|
Enabled: true
|
|
221
688
|
Performance/Size:
|
|
@@ -223,14 +690,49 @@ Performance/Size:
|
|
|
223
690
|
`Array` and `Hash`.
|
|
224
691
|
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
|
225
692
|
Enabled: true
|
|
693
|
+
Performance/CompareWithBlock:
|
|
694
|
+
Description: Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
|
|
695
|
+
Enabled: true
|
|
696
|
+
Performance/StartWith:
|
|
697
|
+
Description: Use `start_with?` instead of a regex match anchored to the beginning
|
|
698
|
+
of a string.
|
|
699
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
|
700
|
+
AutoCorrect: false
|
|
701
|
+
Enabled: true
|
|
226
702
|
Performance/StringReplacement:
|
|
227
703
|
Description: Use `tr` instead of `gsub` when you are replacing the same number of
|
|
228
704
|
characters. Use `delete` instead of `gsub` when you are deleting characters.
|
|
229
705
|
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
|
230
706
|
Enabled: true
|
|
707
|
+
Performance/TimesMap:
|
|
708
|
+
Description: Checks for .times.map calls.
|
|
709
|
+
AutoCorrect: false
|
|
710
|
+
Enabled: true
|
|
711
|
+
Performance/UnfreezeString:
|
|
712
|
+
Description: Use unary plus to get an unfrozen string literal.
|
|
713
|
+
Enabled: true
|
|
714
|
+
Performance/UriDefaultParser:
|
|
715
|
+
Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
|
|
716
|
+
Enabled: true
|
|
231
717
|
Rails/ActionFilter:
|
|
232
718
|
Description: Enforces consistent use of action filter methods.
|
|
233
719
|
Enabled: false
|
|
720
|
+
Rails/ApplicationJob:
|
|
721
|
+
Description: Check that jobs subclass ApplicationJob.
|
|
722
|
+
Enabled: true
|
|
723
|
+
Rails/ApplicationRecord:
|
|
724
|
+
Description: Check that models subclass ApplicationRecord.
|
|
725
|
+
Enabled: true
|
|
726
|
+
Rails/ActiveSupportAliases:
|
|
727
|
+
Description: 'Avoid ActiveSupport aliases of standard ruby methods: `String#starts_with?`,
|
|
728
|
+
`String#ends_with?`, `Array#append`, `Array#prepend`.'
|
|
729
|
+
Enabled: true
|
|
730
|
+
Rails/Blank:
|
|
731
|
+
Description: Enforce using `blank?` and `present?`.
|
|
732
|
+
Enabled: true
|
|
733
|
+
NilOrEmpty: true
|
|
734
|
+
NotPresent: true
|
|
735
|
+
UnlessPresent: true
|
|
234
736
|
Rails/Date:
|
|
235
737
|
Description: Checks the correct usage of date aware methods, such as Date.today,
|
|
236
738
|
Date.current etc.
|
|
@@ -238,20 +740,84 @@ Rails/Date:
|
|
|
238
740
|
Rails/Delegate:
|
|
239
741
|
Description: Prefer delegate method for delegations.
|
|
240
742
|
Enabled: true
|
|
743
|
+
Rails/DelegateAllowBlank:
|
|
744
|
+
Description: Do not use allow_blank as an option to delegate.
|
|
745
|
+
Enabled: true
|
|
746
|
+
Rails/DynamicFindBy:
|
|
747
|
+
Description: Use `find_by` instead of dynamic `find_by_*`.
|
|
748
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
|
749
|
+
Enabled: true
|
|
750
|
+
Rails/EnumUniqueness:
|
|
751
|
+
Description: Avoid duplicate integers in hash-syntax `enum` declaration.
|
|
752
|
+
Enabled: true
|
|
753
|
+
Rails/Exit:
|
|
754
|
+
Description: Favor `fail`, `break`, `return`, etc. over `exit` in application or
|
|
755
|
+
library code outside of Rake files to avoid exits during unit testing or running
|
|
756
|
+
in production.
|
|
757
|
+
Enabled: true
|
|
758
|
+
Rails/FilePath:
|
|
759
|
+
Description: Use `Rails.root.join` for file path joining.
|
|
760
|
+
Enabled: true
|
|
241
761
|
Rails/FindBy:
|
|
242
762
|
Description: Prefer find_by over where.first.
|
|
763
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
|
243
764
|
Enabled: true
|
|
244
765
|
Rails/FindEach:
|
|
245
766
|
Description: Prefer all.find_each over all.find.
|
|
767
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#find-each
|
|
246
768
|
Enabled: true
|
|
247
769
|
Rails/HasAndBelongsToMany:
|
|
248
770
|
Description: Prefer has_many :through to has_and_belongs_to_many.
|
|
771
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#has-many-through
|
|
772
|
+
Enabled: true
|
|
773
|
+
Rails/HasManyOrHasOneDependent:
|
|
774
|
+
Description: Define the dependent option to the has_many and has_one associations.
|
|
775
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#has_many-has_one-dependent-option
|
|
776
|
+
Enabled: true
|
|
777
|
+
Rails/HttpPositionalArguments:
|
|
778
|
+
Description: Use keyword arguments instead of positional arguments in http method
|
|
779
|
+
calls.
|
|
780
|
+
Enabled: true
|
|
781
|
+
Rails/NotNullColumn:
|
|
782
|
+
Description: Do not add a NOT NULL column without a default value
|
|
249
783
|
Enabled: true
|
|
250
784
|
Rails/Output:
|
|
251
785
|
Description: Checks for calls to puts, print, etc.
|
|
252
786
|
Enabled: true
|
|
787
|
+
Rails/OutputSafety:
|
|
788
|
+
Description: The use of `html_safe` or `raw` may be a security risk.
|
|
789
|
+
Enabled: true
|
|
790
|
+
Rails/PluralizationGrammar:
|
|
791
|
+
Description: Checks for incorrect grammar when using methods like `3.day.ago`.
|
|
792
|
+
Enabled: true
|
|
793
|
+
Rails/Present:
|
|
794
|
+
Description: Enforce using `blank?` and `present?`.
|
|
795
|
+
Enabled: true
|
|
796
|
+
NotNilAndNotEmpty: true
|
|
797
|
+
NotBlank: true
|
|
798
|
+
UnlessBlank: true
|
|
253
799
|
Rails/ReadWriteAttribute:
|
|
254
800
|
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
|
801
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#read-attribute
|
|
802
|
+
Enabled: false
|
|
803
|
+
Rails/RelativeDateConstant:
|
|
804
|
+
Description: Do not assign relative date to constants.
|
|
805
|
+
Enabled: true
|
|
806
|
+
Rails/RequestReferer:
|
|
807
|
+
Description: Use consistent syntax for request.referer.
|
|
808
|
+
Enabled: true
|
|
809
|
+
Rails/ReversibleMigration:
|
|
810
|
+
Description: Checks whether the change method of the migration file is reversible.
|
|
811
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#reversible-migration
|
|
812
|
+
Reference: http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html
|
|
813
|
+
Enabled: true
|
|
814
|
+
Rails/SafeNavigation:
|
|
815
|
+
Description: Use Ruby's safe navigation operator (`&.`) instead of `try!`
|
|
816
|
+
Enabled: true
|
|
817
|
+
Rails/SaveBang:
|
|
818
|
+
Description: Identifies possible cases where Active Record save! or related should
|
|
819
|
+
be used.
|
|
820
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#save-bang
|
|
255
821
|
Enabled: false
|
|
256
822
|
Rails/ScopeArgs:
|
|
257
823
|
Description: Checks the arguments of ActiveRecord scopes.
|
|
@@ -261,51 +827,63 @@ Rails/TimeZone:
|
|
|
261
827
|
StyleGuide: https://github.com/bbatsov/rails-style-guide#time
|
|
262
828
|
Reference: http://danilenko.org/2012/7/6/rails_timezones
|
|
263
829
|
Enabled: true
|
|
830
|
+
Rails/UniqBeforePluck:
|
|
831
|
+
Description: Prefer the use of uniq or distinct before pluck.
|
|
832
|
+
Enabled: true
|
|
833
|
+
Rails/UnknownEnv:
|
|
834
|
+
Description: Use correct environment name.
|
|
835
|
+
Enabled: true
|
|
836
|
+
Rails/SkipsModelValidations:
|
|
837
|
+
Description: Use methods that skips model validations with caution. See reference
|
|
838
|
+
for more information.
|
|
839
|
+
Reference: http://guides.rubyonrails.org/active_record_validations.html#skipping-validations
|
|
840
|
+
Enabled: true
|
|
264
841
|
Rails/Validation:
|
|
265
842
|
Description: Use validates :attribute, hash of validations.
|
|
266
843
|
Enabled: true
|
|
267
|
-
|
|
268
|
-
Description:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Style/Alias:
|
|
275
|
-
Description: Use alias_method instead of alias.
|
|
276
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
|
277
|
-
Enabled: false
|
|
278
|
-
Layout/AlignArray:
|
|
279
|
-
Description: Align the elements of an array literal if they span more than one line.
|
|
280
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
|
844
|
+
Security/Eval:
|
|
845
|
+
Description: The use of eval represents a serious security risk.
|
|
846
|
+
Enabled: true
|
|
847
|
+
Security/JSONLoad:
|
|
848
|
+
Description: Prefer usage of `JSON.parse` over `JSON.load` due to potential security
|
|
849
|
+
issues. See reference for more information.
|
|
850
|
+
Reference: http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load
|
|
281
851
|
Enabled: true
|
|
282
|
-
|
|
283
|
-
|
|
852
|
+
AutoCorrect: false
|
|
853
|
+
Security/MarshalLoad:
|
|
854
|
+
Description: Avoid using of `Marshal.load` or `Marshal.restore` due to potential
|
|
855
|
+
security issues. See reference for more information.
|
|
856
|
+
Reference: http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations
|
|
284
857
|
Enabled: true
|
|
285
|
-
|
|
286
|
-
Description:
|
|
287
|
-
|
|
858
|
+
Security/YAMLLoad:
|
|
859
|
+
Description: Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
|
|
860
|
+
security issues. See reference for more information.
|
|
861
|
+
Reference: https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security
|
|
288
862
|
Enabled: true
|
|
863
|
+
Style/Alias:
|
|
864
|
+
Description: Use alias instead of alias_method.
|
|
865
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
|
866
|
+
Enabled: false
|
|
289
867
|
Style/AndOr:
|
|
290
868
|
Description: Use &&/|| instead of and/or.
|
|
291
869
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
|
292
870
|
Enabled: true
|
|
293
871
|
Style/ArrayJoin:
|
|
294
872
|
Description: Use Array#join instead of Array#*.
|
|
295
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
|
873
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join'
|
|
296
874
|
Enabled: false
|
|
297
875
|
Style/AsciiComments:
|
|
298
876
|
Description: Use only ascii symbols in comments.
|
|
299
877
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
|
300
878
|
Enabled: false
|
|
301
|
-
Style/AsciiIdentifiers:
|
|
302
|
-
Description: Use only ascii symbols in identifiers.
|
|
303
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
|
304
|
-
Enabled: false
|
|
305
879
|
Style/Attr:
|
|
306
880
|
Description: Checks for uses of Module#attr.
|
|
307
881
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
|
308
882
|
Enabled: true
|
|
883
|
+
Style/AutoResourceCleanup:
|
|
884
|
+
Description: Suggests the usage of an auto resource cleanup version of a method
|
|
885
|
+
(if available).
|
|
886
|
+
Enabled: false
|
|
309
887
|
Style/BeginBlock:
|
|
310
888
|
Description: Avoid the use of BEGIN blocks.
|
|
311
889
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
|
@@ -318,9 +896,6 @@ Style/BlockComments:
|
|
|
318
896
|
Description: Do not use block comments.
|
|
319
897
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
|
320
898
|
Enabled: false
|
|
321
|
-
Layout/BlockEndNewline:
|
|
322
|
-
Description: Put end statement of multiline block on its own line.
|
|
323
|
-
Enabled: true
|
|
324
899
|
Style/BlockDelimiters:
|
|
325
900
|
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
|
326
901
|
ugly). Prefer {...} over do...end for single-line blocks.
|
|
@@ -333,20 +908,13 @@ Style/CaseEquality:
|
|
|
333
908
|
Description: Avoid explicit use of the case equality operator(===).
|
|
334
909
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
|
335
910
|
Enabled: false
|
|
336
|
-
Layout/CaseIndentation:
|
|
337
|
-
Description: Indentation of when in a case/when/[else/]end.
|
|
338
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
|
339
|
-
Enabled: true
|
|
340
911
|
Style/CharacterLiteral:
|
|
341
912
|
Description: Checks for uses of character literals.
|
|
342
913
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
|
343
914
|
Enabled: false
|
|
344
|
-
Style/ClassAndModuleCamelCase:
|
|
345
|
-
Description: Use CamelCase for classes and modules.
|
|
346
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
|
347
|
-
Enabled: true
|
|
348
915
|
Style/ClassAndModuleChildren:
|
|
349
916
|
Description: Checks style of children classes and modules.
|
|
917
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#namespace-definition
|
|
350
918
|
Enabled: false
|
|
351
919
|
Style/ClassCheck:
|
|
352
920
|
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
|
@@ -359,8 +927,9 @@ Style/ClassVars:
|
|
|
359
927
|
Description: Avoid the use of class variables.
|
|
360
928
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
|
361
929
|
Enabled: false
|
|
362
|
-
|
|
363
|
-
Description:
|
|
930
|
+
Style/CollectionMethods:
|
|
931
|
+
Description: Preferred collection methods.
|
|
932
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
|
364
933
|
Enabled: false
|
|
365
934
|
Style/ColonMethodCall:
|
|
366
935
|
Description: 'Do not use :: for method call.'
|
|
@@ -371,92 +940,86 @@ Style/CommandLiteral:
|
|
|
371
940
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
|
372
941
|
Enabled: false
|
|
373
942
|
Style/CommentAnnotation:
|
|
374
|
-
Description: Checks formatting of
|
|
943
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
|
944
|
+
REVIEW).
|
|
375
945
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
|
376
946
|
Enabled: false
|
|
377
|
-
|
|
378
|
-
Description:
|
|
947
|
+
Style/CommentedKeyword:
|
|
948
|
+
Description: Do not place comments on the same line as certain keywords.
|
|
379
949
|
Enabled: false
|
|
380
|
-
Style/
|
|
381
|
-
Description:
|
|
382
|
-
|
|
950
|
+
Style/ConditionalAssignment:
|
|
951
|
+
Description: Use the return value of `if` and `case` statements for assignment to
|
|
952
|
+
a variable and variable comparison instead of assigning that variable inside of
|
|
953
|
+
each branch.
|
|
383
954
|
Enabled: true
|
|
955
|
+
Style/Copyright:
|
|
956
|
+
Description: Include a copyright notice in each file before any code.
|
|
957
|
+
Enabled: false
|
|
958
|
+
Style/DateTime:
|
|
959
|
+
Description: Use Date or Time over DateTime.
|
|
960
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#date--time
|
|
961
|
+
Enabled: false
|
|
384
962
|
Style/DefWithParentheses:
|
|
385
963
|
Description: Use def with parentheses when there are arguments.
|
|
386
964
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
|
387
965
|
Enabled: true
|
|
966
|
+
Style/Dir:
|
|
967
|
+
Description: Use the `__dir__` method to retrieve the canonicalized absolute path
|
|
968
|
+
to the current file.
|
|
969
|
+
Enabled: false
|
|
388
970
|
Style/Documentation:
|
|
389
971
|
Description: Document classes and non-namespace modules.
|
|
390
972
|
Enabled: false
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
973
|
+
Exclude:
|
|
974
|
+
- spec/**/*
|
|
975
|
+
- test/**/*
|
|
976
|
+
Style/DocumentationMethod:
|
|
977
|
+
Description: Public methods.
|
|
978
|
+
Enabled: false
|
|
979
|
+
Exclude:
|
|
980
|
+
- spec/**/*
|
|
981
|
+
- test/**/*
|
|
395
982
|
Style/DoubleNegation:
|
|
396
983
|
Description: Checks for uses of double negation (!!).
|
|
397
984
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
|
398
985
|
Enabled: true
|
|
986
|
+
Style/EachForSimpleLoop:
|
|
987
|
+
Description: Use `Integer#times` for a simple loop which iterates a fixed number
|
|
988
|
+
of times.
|
|
989
|
+
Enabled: true
|
|
399
990
|
Style/EachWithObject:
|
|
400
991
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
|
401
992
|
Enabled: false
|
|
402
|
-
Layout/ElseAlignment:
|
|
403
|
-
Description: Align elses and elsifs correctly.
|
|
404
|
-
Enabled: true
|
|
405
993
|
Style/EmptyElse:
|
|
406
994
|
Description: Avoid empty else-clauses.
|
|
407
995
|
Enabled: true
|
|
408
|
-
|
|
409
|
-
Description:
|
|
410
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
|
411
|
-
Enabled: true
|
|
412
|
-
Layout/EmptyLines:
|
|
413
|
-
Description: Don't use several empty lines in a row.
|
|
996
|
+
Style/EmptyCaseCondition:
|
|
997
|
+
Description: Avoid empty condition in case statements.
|
|
414
998
|
Enabled: true
|
|
415
|
-
Layout/EmptyLinesAroundAccessModifier:
|
|
416
|
-
Description: Keep blank lines around access modifiers.
|
|
417
|
-
Enabled: false
|
|
418
|
-
Layout/EmptyLinesAroundBlockBody:
|
|
419
|
-
Description: Keeps track of empty lines around block bodies.
|
|
420
|
-
Enabled: false
|
|
421
|
-
Layout/EmptyLinesAroundClassBody:
|
|
422
|
-
Description: Keeps track of empty lines around class bodies.
|
|
423
|
-
Enabled: false
|
|
424
|
-
Layout/EmptyLinesAroundModuleBody:
|
|
425
|
-
Description: Keeps track of empty lines around module bodies.
|
|
426
|
-
Enabled: false
|
|
427
|
-
Layout/EmptyLinesAroundMethodBody:
|
|
428
|
-
Description: Keeps track of empty lines around method bodies.
|
|
429
|
-
Enabled: false
|
|
430
999
|
Style/EmptyLiteral:
|
|
431
1000
|
Description: Prefer literals to Array.new/Hash.new/String.new.
|
|
432
1001
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
|
433
1002
|
Enabled: false
|
|
1003
|
+
Style/EmptyMethod:
|
|
1004
|
+
Description: Checks the formatting of empty method definitions.
|
|
1005
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
|
1006
|
+
Enabled: false
|
|
434
1007
|
Style/EndBlock:
|
|
435
1008
|
Description: Avoid the use of END blocks.
|
|
436
1009
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
|
437
1010
|
Enabled: false
|
|
438
|
-
|
|
439
|
-
Description: Use
|
|
440
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
|
441
|
-
Enabled:
|
|
1011
|
+
Style/Encoding:
|
|
1012
|
+
Description: Use UTF-8 as the source file encoding.
|
|
1013
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
|
1014
|
+
Enabled: true
|
|
442
1015
|
Style/EvenOdd:
|
|
443
|
-
Description: Favor the use of
|
|
1016
|
+
Description: Favor the use of Integer#even? && Integer#odd?
|
|
444
1017
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
|
445
1018
|
Enabled: true
|
|
446
|
-
|
|
447
|
-
Description:
|
|
448
|
-
|
|
449
|
-
Style/FileName:
|
|
450
|
-
Description: Use snake_case for source file names.
|
|
451
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
|
1019
|
+
Style/FrozenStringLiteralComment:
|
|
1020
|
+
Description: Add the frozen_string_literal comment to the top of files to help transition
|
|
1021
|
+
from Ruby 2.3.0 to Ruby 3.0.
|
|
452
1022
|
Enabled: true
|
|
453
|
-
Layout/InitialIndentation:
|
|
454
|
-
Description: Checks the indentation of the first non-blank non-comment line in a
|
|
455
|
-
file.
|
|
456
|
-
Enabled: false
|
|
457
|
-
Layout/FirstParameterIndentation:
|
|
458
|
-
Description: Checks the indentation of the first parameter in a method call.
|
|
459
|
-
Enabled: false
|
|
460
1023
|
Style/FlipFlop:
|
|
461
1024
|
Description: Checks for flip flops
|
|
462
1025
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
|
@@ -469,6 +1032,9 @@ Style/FormatString:
|
|
|
469
1032
|
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
|
470
1033
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
|
471
1034
|
Enabled: false
|
|
1035
|
+
Style/FormatStringToken:
|
|
1036
|
+
Description: Use a consistent style for format string tokens.
|
|
1037
|
+
Enabled: true
|
|
472
1038
|
Style/GlobalVars:
|
|
473
1039
|
Description: Do not introduce global variables.
|
|
474
1040
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
|
@@ -483,31 +1049,39 @@ Style/HashSyntax:
|
|
|
483
1049
|
1, :b => 2 }.'
|
|
484
1050
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
|
485
1051
|
Enabled: true
|
|
1052
|
+
Style/IfInsideElse:
|
|
1053
|
+
Description: Finds if nodes inside else, which can be converted to elsif.
|
|
1054
|
+
Enabled: true
|
|
486
1055
|
Style/IfUnlessModifier:
|
|
487
1056
|
Description: Favor modifier if/unless usage when you have a single-line body.
|
|
488
1057
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
|
489
1058
|
Enabled: true
|
|
1059
|
+
Style/IfUnlessModifierOfIfUnless:
|
|
1060
|
+
Description: Avoid modifier if/unless usage on conditionals.
|
|
1061
|
+
Enabled: true
|
|
490
1062
|
Style/IfWithSemicolon:
|
|
491
1063
|
Description: Do not use if x; .... Use the ternary operator instead.
|
|
492
1064
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
|
493
1065
|
Enabled: true
|
|
494
|
-
|
|
495
|
-
Description:
|
|
496
|
-
|
|
497
|
-
Layout/IndentationWidth:
|
|
498
|
-
Description: Use 2 spaces for indentation.
|
|
499
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
|
1066
|
+
Style/IdenticalConditionalBranches:
|
|
1067
|
+
Description: Checks that conditional statements do not have an identical line at
|
|
1068
|
+
the end of each branch, which can validly be moved out of the conditional.
|
|
500
1069
|
Enabled: true
|
|
501
|
-
Layout/IndentArray:
|
|
502
|
-
Description: Checks the indentation of the first element in an array literal.
|
|
503
|
-
Enabled: false
|
|
504
|
-
Layout/IndentHash:
|
|
505
|
-
Description: Checks the indentation of the first key in a hash literal.
|
|
506
|
-
Enabled: false
|
|
507
1070
|
Style/InfiniteLoop:
|
|
508
1071
|
Description: Use Kernel#loop for infinite loops.
|
|
509
1072
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
|
510
1073
|
Enabled: true
|
|
1074
|
+
Style/InlineComment:
|
|
1075
|
+
Description: Avoid trailing inline comments.
|
|
1076
|
+
Enabled: false
|
|
1077
|
+
Style/InverseMethods:
|
|
1078
|
+
Description: Use the inverse method instead of `!.method` if an inverse method is
|
|
1079
|
+
defined.
|
|
1080
|
+
Enabled: true
|
|
1081
|
+
Style/ImplicitRuntimeError:
|
|
1082
|
+
Description: Use `raise` or `fail` with an explicit exception class and message,
|
|
1083
|
+
rather than just a message.
|
|
1084
|
+
Enabled: false
|
|
511
1085
|
Style/Lambda:
|
|
512
1086
|
Description: Use the new lambda literal syntax for single-line blocks.
|
|
513
1087
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
|
@@ -516,26 +1090,48 @@ Style/LambdaCall:
|
|
|
516
1090
|
Description: Use lambda.call(...) instead of lambda.(...).
|
|
517
1091
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
|
518
1092
|
Enabled: false
|
|
519
|
-
Layout/LeadingCommentSpace:
|
|
520
|
-
Description: Comments should start with a space.
|
|
521
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
|
522
|
-
Enabled: true
|
|
523
1093
|
Style/LineEndConcatenation:
|
|
524
1094
|
Description: Use \ instead of + or << to concatenate two string literals at line
|
|
525
1095
|
end.
|
|
526
1096
|
Enabled: true
|
|
527
1097
|
Style/MethodCallWithoutArgsParentheses:
|
|
528
1098
|
Description: Do not use parentheses for method calls with no arguments.
|
|
529
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
|
1099
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
|
530
1100
|
Enabled: true
|
|
1101
|
+
Style/MethodCallWithArgsParentheses:
|
|
1102
|
+
Description: Use parentheses for method calls with arguments.
|
|
1103
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
|
1104
|
+
Enabled: false
|
|
1105
|
+
Style/MethodCalledOnDoEndBlock:
|
|
1106
|
+
Description: Avoid chaining a method call on a do...end block.
|
|
1107
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
|
1108
|
+
Enabled: false
|
|
531
1109
|
Style/MethodDefParentheses:
|
|
532
1110
|
Description: Checks if the method definitions have or don't have parentheses.
|
|
533
1111
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
|
534
1112
|
Enabled: true
|
|
535
|
-
Style/
|
|
536
|
-
|
|
537
|
-
|
|
1113
|
+
Style/MethodMissingSuper:
|
|
1114
|
+
Enabled: true
|
|
1115
|
+
Style/MissingRespondToMissing:
|
|
1116
|
+
Enabled: true
|
|
1117
|
+
Style/MinMax:
|
|
1118
|
+
Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max`
|
|
1119
|
+
in conjunction.'
|
|
1120
|
+
Enabled: true
|
|
1121
|
+
Style/MissingElse:
|
|
1122
|
+
Description: Require if/case expressions to have an else branches. If enabled, it
|
|
1123
|
+
is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will
|
|
1124
|
+
conflict with Style/EmptyElse if Style/EmptyElse is configured to style "both"
|
|
538
1125
|
Enabled: false
|
|
1126
|
+
EnforcedStyle: both
|
|
1127
|
+
SupportedStyles:
|
|
1128
|
+
- if
|
|
1129
|
+
- case
|
|
1130
|
+
- both
|
|
1131
|
+
Style/MixinGrouping:
|
|
1132
|
+
Description: Checks for grouping of mixins in `class` and `module` bodies.
|
|
1133
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#mixin-grouping
|
|
1134
|
+
Enabled: true
|
|
539
1135
|
Style/ModuleFunction:
|
|
540
1136
|
Description: Checks for usage of `extend self` in modules.
|
|
541
1137
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
|
@@ -544,20 +1140,28 @@ Style/MultilineBlockChain:
|
|
|
544
1140
|
Description: Avoid multi-line chains of blocks.
|
|
545
1141
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
|
546
1142
|
Enabled: false
|
|
547
|
-
Layout/MultilineBlockLayout:
|
|
548
|
-
Description: Ensures newlines after multiline block do statements.
|
|
549
|
-
Enabled: true
|
|
550
1143
|
Style/MultilineIfThen:
|
|
551
1144
|
Description: Do not use then for multi-line if/unless.
|
|
552
1145
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
|
553
1146
|
Enabled: true
|
|
554
|
-
|
|
555
|
-
Description:
|
|
556
|
-
|
|
1147
|
+
Style/MultilineIfModifier:
|
|
1148
|
+
Description: Only use if/unless modifiers on single line statements.
|
|
1149
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-if-modifiers
|
|
1150
|
+
Enabled: true
|
|
1151
|
+
Style/MultilineMemoization:
|
|
1152
|
+
Description: Wrap multiline memoizations in a `begin` and `end` block.
|
|
1153
|
+
Enabled: true
|
|
557
1154
|
Style/MultilineTernaryOperator:
|
|
558
1155
|
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
|
559
1156
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
|
560
1157
|
Enabled: true
|
|
1158
|
+
Style/MultipleComparison:
|
|
1159
|
+
Description: Avoid comparing a variable with multiple items in a conditional, use
|
|
1160
|
+
Array#include? instead.
|
|
1161
|
+
Enabled: true
|
|
1162
|
+
Style/MutableConstant:
|
|
1163
|
+
Description: Do not assign mutable objects to constants.
|
|
1164
|
+
Enabled: true
|
|
561
1165
|
Style/NegatedIf:
|
|
562
1166
|
Description: Favor unless over if for negative conditions (or control flow or).
|
|
563
1167
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
|
@@ -566,6 +1170,14 @@ Style/NegatedWhile:
|
|
|
566
1170
|
Description: Favor until over while for negative conditions.
|
|
567
1171
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
|
568
1172
|
Enabled: true
|
|
1173
|
+
Style/NestedModifier:
|
|
1174
|
+
Description: Avoid using nested modifiers.
|
|
1175
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
|
|
1176
|
+
Enabled: true
|
|
1177
|
+
Style/NestedParenthesizedCalls:
|
|
1178
|
+
Description: Parenthesize method calls which are nested inside the argument list
|
|
1179
|
+
of another parenthesized method call.
|
|
1180
|
+
Enabled: true
|
|
569
1181
|
Style/NestedTernaryOperator:
|
|
570
1182
|
Description: Use one expression per branch in a ternary operator.
|
|
571
1183
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
|
@@ -576,7 +1188,7 @@ Style/Next:
|
|
|
576
1188
|
Enabled: true
|
|
577
1189
|
Style/NilComparison:
|
|
578
1190
|
Description: Prefer x.nil? to x == nil.
|
|
579
|
-
StyleGuide:
|
|
1191
|
+
StyleGuide: "#predicate-methods"
|
|
580
1192
|
Enabled: true
|
|
581
1193
|
Style/NonNilCheck:
|
|
582
1194
|
Description: Checks for redundant nil checks.
|
|
@@ -590,28 +1202,40 @@ Style/NumericLiterals:
|
|
|
590
1202
|
Description: Add underscores to large numeric literals to improve their readability.
|
|
591
1203
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
|
592
1204
|
Enabled: true
|
|
1205
|
+
Style/NumericLiteralPrefix:
|
|
1206
|
+
Description: Use smallcase prefixes for numeric literals.
|
|
1207
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes
|
|
1208
|
+
Enabled: true
|
|
1209
|
+
Style/NumericPredicate:
|
|
1210
|
+
Description: Checks for the use of predicate- or comparison methods for numeric
|
|
1211
|
+
comparisons.
|
|
1212
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
|
1213
|
+
AutoCorrect: false
|
|
1214
|
+
Enabled: true
|
|
593
1215
|
Style/OneLineConditional:
|
|
594
1216
|
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
|
595
1217
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
|
596
1218
|
Enabled: false
|
|
597
|
-
Style/OpMethod:
|
|
598
|
-
Description: When defining binary operators, name the argument other.
|
|
599
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
|
600
|
-
Enabled: false
|
|
601
1219
|
Style/OptionalArguments:
|
|
602
1220
|
Description: Checks for optional arguments that do not appear at the end of the
|
|
603
1221
|
argument list
|
|
604
1222
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
|
|
605
1223
|
Enabled: false
|
|
1224
|
+
Style/OptionHash:
|
|
1225
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
|
1226
|
+
Enabled: false
|
|
1227
|
+
Style/OrAssignment:
|
|
1228
|
+
Description: Recommend usage of double pipe equals (||=) where applicable.
|
|
1229
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-pipe-for-uninit
|
|
1230
|
+
Enabled: true
|
|
606
1231
|
Style/ParallelAssignment:
|
|
607
1232
|
Description: Check for simple usages of parallel assignment. It will only warn when
|
|
608
|
-
the number of variables matches on both sides of the assignment.
|
|
609
|
-
performance benefits
|
|
1233
|
+
the number of variables matches on both sides of the assignment.
|
|
610
1234
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
|
|
611
1235
|
Enabled: false
|
|
612
1236
|
Style/ParenthesesAroundCondition:
|
|
613
1237
|
Description: Don't use parentheses around the condition of an if/unless/while.
|
|
614
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-
|
|
1238
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-around-condition
|
|
615
1239
|
Enabled: true
|
|
616
1240
|
Style/PercentLiteralDelimiters:
|
|
617
1241
|
Description: Use `%`-literal delimiters consistently
|
|
@@ -631,9 +1255,9 @@ Style/PerlBackrefs:
|
|
|
631
1255
|
Description: Avoid Perl-style regex back references.
|
|
632
1256
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
|
633
1257
|
Enabled: false
|
|
634
|
-
Style/
|
|
635
|
-
Description:
|
|
636
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
|
1258
|
+
Style/PreferredHashMethods:
|
|
1259
|
+
Description: Checks use of `has_key?` and `has_value?` Hash methods.
|
|
1260
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
|
637
1261
|
Enabled: true
|
|
638
1262
|
Style/Proc:
|
|
639
1263
|
Description: Use proc instead of Proc.new.
|
|
@@ -647,10 +1271,19 @@ Style/RedundantBegin:
|
|
|
647
1271
|
Description: Don't use begin blocks when they are not needed.
|
|
648
1272
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
|
649
1273
|
Enabled: true
|
|
1274
|
+
Style/RedundantConditional:
|
|
1275
|
+
Description: Don't return true/false from a conditional.
|
|
1276
|
+
Enabled: true
|
|
650
1277
|
Style/RedundantException:
|
|
651
1278
|
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
|
652
1279
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
|
653
1280
|
Enabled: true
|
|
1281
|
+
Style/RedundantFreeze:
|
|
1282
|
+
Description: Checks usages of Object#freeze on immutable objects.
|
|
1283
|
+
Enabled: true
|
|
1284
|
+
Style/RedundantParentheses:
|
|
1285
|
+
Description: Checks for parentheses that seem not to serve any purpose.
|
|
1286
|
+
Enabled: true
|
|
654
1287
|
Style/RedundantReturn:
|
|
655
1288
|
Description: Don't use return where it's not required.
|
|
656
1289
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
|
@@ -663,13 +1296,21 @@ Style/RegexpLiteral:
|
|
|
663
1296
|
Description: Use / or %r around regular expressions.
|
|
664
1297
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
|
665
1298
|
Enabled: false
|
|
666
|
-
Layout/RescueEnsureAlignment:
|
|
667
|
-
Description: Align rescues and ensures correctly.
|
|
668
|
-
Enabled: false
|
|
669
1299
|
Style/RescueModifier:
|
|
670
1300
|
Description: Avoid using rescue in its modifier form.
|
|
671
1301
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
|
672
1302
|
Enabled: false
|
|
1303
|
+
Style/RescueStandardError:
|
|
1304
|
+
Description: Avoid rescuing without specifying an error class.
|
|
1305
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
|
1306
|
+
Enabled: true
|
|
1307
|
+
Style/ReturnNil:
|
|
1308
|
+
Description: Use return instead of return nil.
|
|
1309
|
+
Enabled: false
|
|
1310
|
+
Style/SafeNavigation:
|
|
1311
|
+
Description: This cop transforms usages of a method call safeguarded by a check
|
|
1312
|
+
for the existance of the object to safe navigation (`&.`).
|
|
1313
|
+
Enabled: true
|
|
673
1314
|
Style/SelfAssignment:
|
|
674
1315
|
Description: Checks for places where self-assignment shorthand should have been
|
|
675
1316
|
used.
|
|
@@ -679,99 +1320,34 @@ Style/Semicolon:
|
|
|
679
1320
|
Description: Don't use semicolons to terminate expressions.
|
|
680
1321
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
|
681
1322
|
Enabled: true
|
|
1323
|
+
Style/Send:
|
|
1324
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
|
1325
|
+
may overlap with existing methods.
|
|
1326
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
|
1327
|
+
Enabled: false
|
|
682
1328
|
Style/SignalException:
|
|
683
1329
|
Description: Checks for proper usage of fail and raise.
|
|
684
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail
|
|
1330
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail
|
|
685
1331
|
Enabled: true
|
|
686
1332
|
Style/SingleLineBlockParams:
|
|
687
1333
|
Description: Enforces the names of some block params.
|
|
688
|
-
|
|
689
|
-
Enabled: true
|
|
1334
|
+
Enabled: false
|
|
690
1335
|
Style/SingleLineMethods:
|
|
691
1336
|
Description: Avoid single-line methods.
|
|
692
1337
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
|
693
1338
|
Enabled: false
|
|
694
|
-
Layout/SpaceBeforeFirstArg:
|
|
695
|
-
Description: Checks that exactly one space is used between a method name and the
|
|
696
|
-
first argument for method calls without parentheses.
|
|
697
|
-
Enabled: true
|
|
698
|
-
Layout/SpaceAfterColon:
|
|
699
|
-
Description: Use spaces after colons.
|
|
700
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
701
|
-
Enabled: true
|
|
702
|
-
Layout/SpaceAfterComma:
|
|
703
|
-
Description: Use spaces after commas.
|
|
704
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
705
|
-
Enabled: true
|
|
706
|
-
Layout/SpaceAroundKeyword:
|
|
707
|
-
Description: Use spaces around keywords.
|
|
708
|
-
Enabled: true
|
|
709
|
-
Layout/SpaceAfterMethodName:
|
|
710
|
-
Description: Do not put a space between a method name and the opening parenthesis
|
|
711
|
-
in a method definition.
|
|
712
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
|
713
|
-
Enabled: true
|
|
714
|
-
Layout/SpaceAfterNot:
|
|
715
|
-
Description: Tracks redundant space after the ! operator.
|
|
716
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
|
717
|
-
Enabled: false
|
|
718
|
-
Layout/SpaceAfterSemicolon:
|
|
719
|
-
Description: Use spaces after semicolons.
|
|
720
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
721
|
-
Enabled: true
|
|
722
|
-
Layout/SpaceBeforeBlockBraces:
|
|
723
|
-
Description: Checks that the left block brace has or doesn't have space before it.
|
|
724
|
-
Enabled: false
|
|
725
|
-
Layout/SpaceBeforeComma:
|
|
726
|
-
Description: No spaces before commas.
|
|
727
|
-
Enabled: false
|
|
728
|
-
Layout/SpaceBeforeComment:
|
|
729
|
-
Description: Checks for missing space between code and a comment on the same line.
|
|
730
|
-
Enabled: false
|
|
731
|
-
Layout/SpaceBeforeSemicolon:
|
|
732
|
-
Description: No spaces before semicolons.
|
|
733
|
-
Enabled: false
|
|
734
|
-
Layout/SpaceInsideBlockBraces:
|
|
735
|
-
Description: Checks that block braces have or don't have surrounding space. For
|
|
736
|
-
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
|
737
|
-
space.
|
|
738
|
-
Enabled: false
|
|
739
|
-
Layout/SpaceAroundBlockParameters:
|
|
740
|
-
Description: Checks the spacing inside and after block parameters pipes.
|
|
741
|
-
Enabled: true
|
|
742
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
|
743
|
-
Description: Checks that the equals signs in parameter default assignments have
|
|
744
|
-
or don't have surrounding space depending on configuration.
|
|
745
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
|
746
|
-
Enabled: true
|
|
747
|
-
Layout/SpaceAroundOperators:
|
|
748
|
-
Description: Use a single space around operators.
|
|
749
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
750
|
-
Enabled: true
|
|
751
|
-
Layout/SpaceInsideBrackets:
|
|
752
|
-
Description: No spaces after [ or before ].
|
|
753
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
|
754
|
-
Enabled: false
|
|
755
|
-
Layout/SpaceInsideHashLiteralBraces:
|
|
756
|
-
Description: Use spaces inside hash literal braces - or don't.
|
|
757
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
|
758
|
-
Enabled: true
|
|
759
|
-
Layout/SpaceInsideParens:
|
|
760
|
-
Description: No spaces after ( or before ).
|
|
761
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
|
762
|
-
Enabled: true
|
|
763
|
-
Layout/SpaceInsideRangeLiteral:
|
|
764
|
-
Description: No spaces inside range literals.
|
|
765
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
|
766
|
-
Enabled: true
|
|
767
|
-
Layout/SpaceInsideStringInterpolation:
|
|
768
|
-
Description: Checks for padding/surrounding spaces inside string interpolation.
|
|
769
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
|
770
|
-
Enabled: false
|
|
771
1339
|
Style/SpecialGlobalVars:
|
|
772
1340
|
Description: Avoid Perl-style global variables.
|
|
773
1341
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
|
774
1342
|
Enabled: false
|
|
1343
|
+
Style/StabbyLambdaParentheses:
|
|
1344
|
+
Description: Check for the usage of parentheses around stabby lambda arguments.
|
|
1345
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
|
|
1346
|
+
Enabled: true
|
|
1347
|
+
Style/StderrPuts:
|
|
1348
|
+
Description: Use `warn` instead of `$stderr.puts`.
|
|
1349
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#warn
|
|
1350
|
+
Enabled: true
|
|
775
1351
|
Style/StringLiterals:
|
|
776
1352
|
Description: Checks if uses of quotes match the configured preference.
|
|
777
1353
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
|
@@ -781,35 +1357,40 @@ Style/StringLiteralsInInterpolation:
|
|
|
781
1357
|
Description: Checks if uses of quotes inside expressions in interpolated strings
|
|
782
1358
|
match the configured preference.
|
|
783
1359
|
Enabled: true
|
|
1360
|
+
Style/StringMethods:
|
|
1361
|
+
Description: Checks if configured preferred methods are used over non-preferred.
|
|
1362
|
+
Enabled: false
|
|
784
1363
|
Style/StructInheritance:
|
|
785
1364
|
Description: Checks for inheritance from Struct.new.
|
|
786
1365
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
|
787
1366
|
Enabled: false
|
|
1367
|
+
Style/SymbolArray:
|
|
1368
|
+
Description: Use %i or %I for arrays of symbols.
|
|
1369
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
|
1370
|
+
Enabled: true
|
|
788
1371
|
Style/SymbolLiteral:
|
|
789
1372
|
Description: Use plain symbols instead of string symbols when possible.
|
|
790
1373
|
Enabled: false
|
|
791
1374
|
Style/SymbolProc:
|
|
792
1375
|
Description: Use symbols as procs instead of blocks when possible.
|
|
793
1376
|
Enabled: false
|
|
794
|
-
|
|
795
|
-
Description:
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
|
801
|
-
Enabled: false
|
|
1377
|
+
Style/TernaryParentheses:
|
|
1378
|
+
Description: Checks for use of parentheses around ternary conditions.
|
|
1379
|
+
Enabled: true
|
|
1380
|
+
Style/MixinUsage:
|
|
1381
|
+
Description: Checks that `include`, `extend` and `prepend` exists at the top level.
|
|
1382
|
+
Enabled: true
|
|
802
1383
|
Style/TrailingCommaInArguments:
|
|
803
|
-
Description: Checks for trailing comma in
|
|
804
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma
|
|
1384
|
+
Description: Checks for trailing comma in argument lists.
|
|
1385
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
|
805
1386
|
Enabled: false
|
|
806
|
-
Style/
|
|
807
|
-
Description: Checks for trailing comma in literals.
|
|
1387
|
+
Style/TrailingCommaInArrayLiteral:
|
|
1388
|
+
Description: Checks for trailing comma in array and hash literals.'
|
|
808
1389
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
|
809
1390
|
Enabled: false
|
|
810
|
-
|
|
811
|
-
Description:
|
|
812
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-
|
|
1391
|
+
Style/TrailingCommaInHashLiteral:
|
|
1392
|
+
Description: Checks for trailing comma in array and hash literals.'
|
|
1393
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
|
813
1394
|
Enabled: false
|
|
814
1395
|
Style/TrivialAccessors:
|
|
815
1396
|
Description: Prefer attr_* methods to trivial readers/writers.
|
|
@@ -822,6 +1403,9 @@ Style/UnlessElse:
|
|
|
822
1403
|
Style/UnneededCapitalW:
|
|
823
1404
|
Description: Checks for %W when interpolation is not needed.
|
|
824
1405
|
Enabled: false
|
|
1406
|
+
Style/UnneededInterpolation:
|
|
1407
|
+
Description: Checks for strings that are just an interpolated expression.
|
|
1408
|
+
Enabled: true
|
|
825
1409
|
Style/UnneededPercentQ:
|
|
826
1410
|
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
|
827
1411
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
|
@@ -829,16 +1413,13 @@ Style/UnneededPercentQ:
|
|
|
829
1413
|
Style/TrailingUnderscoreVariable:
|
|
830
1414
|
Description: Checks for the usage of unneeded trailing underscores at the end of
|
|
831
1415
|
parallel variable assignment.
|
|
1416
|
+
AllowNamedUnderscoreVariables: true
|
|
832
1417
|
Enabled: false
|
|
833
1418
|
Style/VariableInterpolation:
|
|
834
1419
|
Description: Don't interpolate global, instance and class variables directly in
|
|
835
1420
|
strings.
|
|
836
1421
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
|
837
1422
|
Enabled: true
|
|
838
|
-
Style/VariableName:
|
|
839
|
-
Description: Use the configured style when naming variables.
|
|
840
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
|
841
|
-
Enabled: true
|
|
842
1423
|
Style/WhenThen:
|
|
843
1424
|
Description: Use when x then ... for one-line cases.
|
|
844
1425
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
|
@@ -851,16 +1432,14 @@ Style/WhileUntilModifier:
|
|
|
851
1432
|
Description: Favor modifier while/until usage when you have a single-line body.
|
|
852
1433
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
|
853
1434
|
Enabled: true
|
|
854
|
-
Style/MutableConstant:
|
|
855
|
-
Enabled: true
|
|
856
|
-
Style/FrozenStringLiteralComment:
|
|
857
|
-
Enabled: true
|
|
858
1435
|
Style/WordArray:
|
|
859
1436
|
Description: Use %w or %W for arrays of words.
|
|
860
1437
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
|
861
1438
|
Enabled: true
|
|
862
|
-
Style/
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1439
|
+
Style/YodaCondition:
|
|
1440
|
+
Description: Do not use literals as the first operand of a comparison.
|
|
1441
|
+
Reference: https://en.wikipedia.org/wiki/Yoda_conditions
|
|
1442
|
+
Enabled: true
|
|
1443
|
+
Style/ZeroLengthPredicate:
|
|
1444
|
+
Description: Use
|
|
866
1445
|
Enabled: true
|