rubocop_config 0.48.1.1 → 0.49.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +476 -795
- data/Rakefile +2 -1
- data/config/default.yml +484 -793
- data/lib/rubocop_config/version.rb +1 -1
- data/rubocop_config.gemspec +1 -1
- metadata +5 -5
data/Rakefile
CHANGED
data/config/default.yml
CHANGED
@@ -1,1175 +1,866 @@
|
|
1
|
+
---
|
1
2
|
AllCops:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Exclude:
|
4
|
+
- vendor/**/*
|
5
|
+
- Gemfile.lock
|
6
|
+
- db/schema.rb
|
7
|
+
TargetRubyVersion: 2.4
|
6
8
|
Lint/AmbiguousOperator:
|
7
|
-
Description:
|
8
|
-
|
9
|
-
|
10
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
9
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
10
|
+
without parentheses.
|
11
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
11
12
|
Enabled: true
|
12
|
-
|
13
|
+
Lint/AmbiguousBlockAssociation:
|
14
|
+
Enabled: false
|
13
15
|
Lint/AmbiguousRegexpLiteral:
|
14
|
-
Description:
|
15
|
-
|
16
|
-
a method invocation without parenthesis.
|
16
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
17
|
+
invocation without parenthesis.
|
17
18
|
Enabled: true
|
18
|
-
|
19
19
|
Lint/AssignmentInCondition:
|
20
|
-
Description:
|
21
|
-
StyleGuide:
|
20
|
+
Description: Don't use assignment in conditions.
|
21
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
22
22
|
Enabled: true
|
23
|
-
|
24
23
|
Lint/BlockAlignment:
|
25
|
-
Description:
|
24
|
+
Description: Align block ends correctly.
|
26
25
|
Enabled: true
|
27
|
-
|
28
26
|
Lint/CircularArgumentReference:
|
29
|
-
Description:
|
27
|
+
Description: Don't refer to the keyword argument in the default value.
|
30
28
|
Enabled: true
|
31
|
-
|
32
29
|
Lint/ConditionPosition:
|
33
|
-
Description:
|
34
|
-
|
35
|
-
|
36
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
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
|
37
33
|
Enabled: true
|
38
|
-
|
39
34
|
Lint/Debugger:
|
40
|
-
Description:
|
35
|
+
Description: Check for debugger calls.
|
41
36
|
Enabled: true
|
42
|
-
|
43
37
|
Lint/DefEndAlignment:
|
44
|
-
Description:
|
38
|
+
Description: Align ends corresponding to defs correctly.
|
45
39
|
Enabled: true
|
46
|
-
|
47
40
|
Lint/DeprecatedClassMethods:
|
48
|
-
Description:
|
41
|
+
Description: Check for deprecated class method calls.
|
49
42
|
Enabled: true
|
50
|
-
|
51
43
|
Lint/DuplicateMethods:
|
52
|
-
Description:
|
44
|
+
Description: Check for duplicate methods calls.
|
53
45
|
Enabled: true
|
54
|
-
|
55
46
|
Lint/EachWithObjectArgument:
|
56
|
-
Description:
|
47
|
+
Description: Check for immutable argument given to each_with_object.
|
57
48
|
Enabled: true
|
58
|
-
|
59
49
|
Lint/ElseLayout:
|
60
|
-
Description:
|
50
|
+
Description: Check for odd code arrangement in an else block.
|
61
51
|
Enabled: true
|
62
|
-
|
63
52
|
Lint/EmptyEnsure:
|
64
|
-
Description:
|
53
|
+
Description: Checks for empty ensure block.
|
65
54
|
Enabled: true
|
66
|
-
|
67
55
|
Lint/EmptyInterpolation:
|
68
|
-
Description:
|
56
|
+
Description: Checks for empty string interpolation.
|
69
57
|
Enabled: true
|
70
|
-
|
71
58
|
Lint/EndAlignment:
|
72
|
-
Description:
|
59
|
+
Description: Align ends correctly.
|
73
60
|
Enabled: true
|
74
|
-
|
75
61
|
Lint/EndInMethod:
|
76
|
-
Description:
|
62
|
+
Description: END blocks should not be placed inside method definitions.
|
77
63
|
Enabled: true
|
78
|
-
|
79
64
|
Lint/EnsureReturn:
|
80
|
-
Description:
|
81
|
-
StyleGuide:
|
65
|
+
Description: Do not use return in an ensure block.
|
66
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
82
67
|
Enabled: true
|
83
|
-
|
84
68
|
Lint/FormatParameterMismatch:
|
85
|
-
Description:
|
69
|
+
Description: The number of parameters to format/sprint must match the fields.
|
86
70
|
Enabled: true
|
87
|
-
|
88
71
|
Lint/HandleExceptions:
|
89
|
-
Description:
|
90
|
-
StyleGuide:
|
72
|
+
Description: Don't suppress exception.
|
73
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
91
74
|
Enabled: true
|
92
|
-
|
93
75
|
Lint/InvalidCharacterLiteral:
|
94
|
-
Description:
|
95
|
-
|
96
|
-
whitespace character.
|
76
|
+
Description: Checks for invalid character literals with a non-escaped whitespace
|
77
|
+
character.
|
97
78
|
Enabled: true
|
98
|
-
|
99
79
|
Lint/LiteralInCondition:
|
100
|
-
Description:
|
80
|
+
Description: Checks of literals used in conditions.
|
101
81
|
Enabled: true
|
102
|
-
|
103
82
|
Lint/LiteralInInterpolation:
|
104
|
-
Description:
|
83
|
+
Description: Checks for literals used in interpolation.
|
105
84
|
Enabled: true
|
106
|
-
|
107
85
|
Lint/Loop:
|
108
|
-
Description:
|
109
|
-
|
110
|
-
|
111
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
86
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
87
|
+
for post-loop tests.
|
88
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
112
89
|
Enabled: true
|
113
|
-
|
114
90
|
Lint/NestedMethodDefinition:
|
115
|
-
Description:
|
116
|
-
StyleGuide:
|
91
|
+
Description: Do not use nested method definitions.
|
92
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
117
93
|
Enabled: true
|
118
|
-
|
119
94
|
Lint/NonLocalExitFromIterator:
|
120
|
-
Description:
|
95
|
+
Description: Do not use return in iterator to cause non-local exit.
|
121
96
|
Enabled: true
|
122
|
-
|
123
97
|
Lint/ParenthesesAsGroupedExpression:
|
124
|
-
Description:
|
125
|
-
|
126
|
-
parenthesis.
|
127
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
98
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
99
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
128
100
|
Enabled: true
|
129
|
-
|
130
101
|
Lint/RequireParentheses:
|
131
|
-
Description:
|
132
|
-
Use parentheses in the method call to avoid confusion
|
133
|
-
about precedence.
|
102
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
134
103
|
Enabled: true
|
135
|
-
|
136
104
|
Lint/RescueException:
|
137
|
-
Description:
|
138
|
-
StyleGuide:
|
105
|
+
Description: Avoid rescuing the Exception class.
|
106
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
139
107
|
Enabled: true
|
140
|
-
|
141
108
|
Lint/ShadowingOuterLocalVariable:
|
142
|
-
Description:
|
143
|
-
|
144
|
-
for block arguments or block local variables.
|
109
|
+
Description: Do not use the same name as outer local variable for block arguments
|
110
|
+
or block local variables.
|
145
111
|
Enabled: true
|
146
|
-
|
147
112
|
Lint/StringConversionInInterpolation:
|
148
|
-
Description:
|
149
|
-
StyleGuide:
|
113
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
114
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
150
115
|
Enabled: true
|
151
|
-
|
152
116
|
Lint/UnderscorePrefixedVariableName:
|
153
|
-
Description:
|
117
|
+
Description: Do not use prefix `_` for a variable that is used.
|
154
118
|
Enabled: true
|
155
|
-
|
156
119
|
Lint/UnneededDisable:
|
157
|
-
Description:
|
158
|
-
|
159
|
-
Note: this cop is not disabled when disabling all cops.
|
160
|
-
It must be explicitly disabled.
|
120
|
+
Description: 'Checks for rubocop:disable comments that can be removed. Note: this
|
121
|
+
cop is not disabled when disabling all cops. It must be explicitly disabled.'
|
161
122
|
Enabled: true
|
162
|
-
|
163
123
|
Lint/UnusedBlockArgument:
|
164
|
-
Description:
|
165
|
-
StyleGuide:
|
124
|
+
Description: Checks for unused block arguments.
|
125
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
166
126
|
Enabled: true
|
167
|
-
|
168
127
|
Lint/UnusedMethodArgument:
|
169
|
-
Description:
|
170
|
-
StyleGuide:
|
128
|
+
Description: Checks for unused method arguments.
|
129
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
171
130
|
Enabled: true
|
172
|
-
|
173
131
|
Lint/UnreachableCode:
|
174
|
-
Description:
|
132
|
+
Description: Unreachable code.
|
175
133
|
Enabled: true
|
176
|
-
|
177
134
|
Lint/UselessAccessModifier:
|
178
|
-
Description:
|
135
|
+
Description: Checks for useless access modifiers.
|
179
136
|
Enabled: true
|
180
|
-
|
181
137
|
Lint/UselessAssignment:
|
182
|
-
Description:
|
183
|
-
StyleGuide:
|
138
|
+
Description: Checks for useless assignment to a local variable.
|
139
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
184
140
|
Enabled: true
|
185
|
-
|
186
141
|
Lint/UselessComparison:
|
187
|
-
Description:
|
142
|
+
Description: Checks for comparison of something with itself.
|
188
143
|
Enabled: true
|
189
|
-
|
190
144
|
Lint/UselessElseWithoutRescue:
|
191
|
-
Description:
|
145
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
192
146
|
Enabled: true
|
193
|
-
|
194
147
|
Lint/UselessSetterCall:
|
195
|
-
Description:
|
148
|
+
Description: Checks for useless setter call to a local variable.
|
196
149
|
Enabled: true
|
197
|
-
|
198
150
|
Lint/Void:
|
199
|
-
Description:
|
151
|
+
Description: Possible use of operator/literal/variable in void context.
|
200
152
|
Enabled: true
|
201
|
-
|
202
|
-
###################### Metrics ####################################
|
203
|
-
|
204
153
|
Metrics/AbcSize:
|
205
|
-
Description:
|
206
|
-
|
207
|
-
|
208
|
-
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
154
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
155
|
+
conditions.
|
156
|
+
Reference: http://c2.com/cgi/wiki?AbcMetric
|
209
157
|
Enabled: true
|
210
158
|
Max: 15
|
211
|
-
|
212
159
|
Metrics/BlockNesting:
|
213
|
-
Description:
|
214
|
-
StyleGuide:
|
160
|
+
Description: Avoid excessive block nesting
|
161
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
215
162
|
Enabled: true
|
216
163
|
Max: 4
|
217
|
-
|
218
164
|
Metrics/ClassLength:
|
219
|
-
Description:
|
165
|
+
Description: Avoid classes longer than 100 lines of code.
|
220
166
|
Enabled: true
|
221
167
|
Max: 100
|
222
|
-
|
223
168
|
Metrics/CyclomaticComplexity:
|
224
|
-
Description:
|
225
|
-
|
226
|
-
of test cases needed to validate a method.
|
169
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
170
|
+
cases needed to validate a method.
|
227
171
|
Enabled: true
|
228
|
-
|
229
172
|
Metrics/LineLength:
|
230
|
-
Description:
|
231
|
-
StyleGuide:
|
173
|
+
Description: Limit lines to 80 characters.
|
174
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
232
175
|
Enabled: true
|
233
|
-
|
234
176
|
Metrics/MethodLength:
|
235
|
-
Description:
|
236
|
-
StyleGuide:
|
177
|
+
Description: Avoid methods longer than 10 lines of code.
|
178
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
237
179
|
Enabled: true
|
238
180
|
Max: 10
|
239
|
-
|
240
181
|
Metrics/ModuleLength:
|
241
|
-
Description:
|
182
|
+
Description: Avoid modules longer than 100 lines of code.
|
242
183
|
Enabled: true
|
243
184
|
Max: 100
|
244
|
-
|
245
185
|
Metrics/ParameterLists:
|
246
|
-
Description:
|
247
|
-
StyleGuide:
|
186
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
187
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
248
188
|
Enabled: false
|
249
|
-
|
250
189
|
Metrics/PerceivedComplexity:
|
251
|
-
Description:
|
252
|
-
|
253
|
-
human reader.
|
190
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
191
|
+
reader.
|
254
192
|
Enabled: true
|
255
|
-
|
256
193
|
Metrics/BlockLength:
|
257
194
|
Exclude:
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
##################### Performance #############################
|
263
|
-
|
195
|
+
- Rakefile
|
196
|
+
- "**/*.rake"
|
197
|
+
- spec/**/*.rb
|
264
198
|
Performance/Count:
|
265
|
-
Description:
|
266
|
-
|
267
|
-
`select...count`, `reject...count`, `select...length`,
|
268
|
-
and `reject...length`.
|
199
|
+
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
|
200
|
+
`reject...count`, `select...length`, and `reject...length`.
|
269
201
|
Enabled: true
|
270
|
-
|
271
202
|
Performance/Detect:
|
272
|
-
Description:
|
273
|
-
|
274
|
-
|
275
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
203
|
+
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
|
204
|
+
and `find_all.last`.
|
205
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
|
276
206
|
Enabled: true
|
277
|
-
|
278
207
|
Performance/FlatMap:
|
279
|
-
Description:
|
280
|
-
|
281
|
-
|
282
|
-
or `Enumberable#collect..Array#flatten(1)`
|
283
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
208
|
+
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
|
209
|
+
or `Enumberable#collect..Array#flatten(1)`
|
210
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
284
211
|
Enabled: true
|
285
212
|
EnabledForFlattenWithoutParams: false
|
286
|
-
# If enabled, this cop will warn about usages of
|
287
|
-
# `flatten` being called without any parameters.
|
288
|
-
# This can be dangerous since `flat_map` will only flatten 1 level, and
|
289
|
-
# `flatten` without any parameters can flatten multiple levels.
|
290
|
-
|
291
213
|
Performance/ReverseEach:
|
292
|
-
Description:
|
293
|
-
Reference:
|
214
|
+
Description: Use `reverse_each` instead of `reverse.each`.
|
215
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
294
216
|
Enabled: true
|
295
|
-
|
296
217
|
Performance/Sample:
|
297
|
-
Description:
|
298
|
-
|
299
|
-
`shuffle.last`, and `shuffle[Fixnum]`.
|
300
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
218
|
+
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
|
219
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
301
220
|
Enabled: true
|
302
|
-
|
303
221
|
Performance/Size:
|
304
|
-
Description:
|
305
|
-
|
306
|
-
|
307
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
222
|
+
Description: Use `size` instead of `count` for counting the number of elements in
|
223
|
+
`Array` and `Hash`.
|
224
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
308
225
|
Enabled: true
|
309
|
-
|
310
226
|
Performance/StringReplacement:
|
311
|
-
Description:
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
316
|
-
Enabled: true
|
317
|
-
|
318
|
-
##################### Rails ##################################
|
319
|
-
|
227
|
+
Description: Use `tr` instead of `gsub` when you are replacing the same number of
|
228
|
+
characters. Use `delete` instead of `gsub` when you are deleting characters.
|
229
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
230
|
+
Enabled: true
|
320
231
|
Rails/ActionFilter:
|
321
|
-
Description:
|
232
|
+
Description: Enforces consistent use of action filter methods.
|
322
233
|
Enabled: false
|
323
|
-
|
324
234
|
Rails/Date:
|
325
|
-
Description:
|
326
|
-
|
327
|
-
such as Date.today, Date.current etc.
|
235
|
+
Description: Checks the correct usage of date aware methods, such as Date.today,
|
236
|
+
Date.current etc.
|
328
237
|
Enabled: true
|
329
|
-
|
330
238
|
Rails/Delegate:
|
331
|
-
Description:
|
239
|
+
Description: Prefer delegate method for delegations.
|
332
240
|
Enabled: true
|
333
|
-
|
334
241
|
Rails/FindBy:
|
335
|
-
Description:
|
242
|
+
Description: Prefer find_by over where.first.
|
336
243
|
Enabled: true
|
337
|
-
|
338
244
|
Rails/FindEach:
|
339
|
-
Description:
|
245
|
+
Description: Prefer all.find_each over all.find.
|
340
246
|
Enabled: true
|
341
|
-
|
342
247
|
Rails/HasAndBelongsToMany:
|
343
|
-
Description:
|
248
|
+
Description: Prefer has_many :through to has_and_belongs_to_many.
|
344
249
|
Enabled: true
|
345
|
-
|
346
250
|
Rails/Output:
|
347
|
-
Description:
|
251
|
+
Description: Checks for calls to puts, print, etc.
|
348
252
|
Enabled: true
|
349
|
-
|
350
253
|
Rails/ReadWriteAttribute:
|
351
|
-
Description:
|
352
|
-
Checks for read_attribute(:attr) and
|
353
|
-
write_attribute(:attr, val).
|
254
|
+
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
354
255
|
Enabled: false
|
355
|
-
|
356
256
|
Rails/ScopeArgs:
|
357
|
-
Description:
|
257
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
358
258
|
Enabled: true
|
359
|
-
|
360
259
|
Rails/TimeZone:
|
361
|
-
Description:
|
362
|
-
StyleGuide:
|
363
|
-
Reference:
|
260
|
+
Description: Checks the correct usage of time zone aware methods.
|
261
|
+
StyleGuide: https://github.com/bbatsov/rails-style-guide#time
|
262
|
+
Reference: http://danilenko.org/2012/7/6/rails_timezones
|
364
263
|
Enabled: true
|
365
|
-
|
366
264
|
Rails/Validation:
|
367
|
-
Description:
|
265
|
+
Description: Use validates :attribute, hash of validations.
|
368
266
|
Enabled: true
|
369
|
-
|
370
|
-
################## Style #################################
|
371
|
-
|
372
|
-
Style/AccessModifierIndentation:
|
267
|
+
Layout/AccessModifierIndentation:
|
373
268
|
Description: Check indentation of private/protected visibility modifiers.
|
374
|
-
StyleGuide:
|
269
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
375
270
|
Enabled: false
|
376
|
-
|
377
271
|
Style/AccessorMethodName:
|
378
272
|
Description: Check the naming of accessor methods for get_/set_.
|
379
273
|
Enabled: false
|
380
|
-
|
381
274
|
Style/Alias:
|
382
|
-
Description:
|
383
|
-
StyleGuide:
|
384
|
-
Enabled: false
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
Enabled: true
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
one line.
|
397
|
-
Enabled: true
|
398
|
-
|
399
|
-
Style/AlignParameters:
|
400
|
-
Description: >-
|
401
|
-
Align the parameters of a method call if they span more
|
402
|
-
than one line.
|
403
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
404
|
-
Enabled: true
|
405
|
-
|
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
|
281
|
+
Enabled: true
|
282
|
+
Layout/AlignHash:
|
283
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
284
|
+
Enabled: true
|
285
|
+
Layout/AlignParameters:
|
286
|
+
Description: Align the parameters of a method call if they span more than one line.
|
287
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
288
|
+
Enabled: true
|
406
289
|
Style/AndOr:
|
407
|
-
Description:
|
408
|
-
StyleGuide:
|
290
|
+
Description: Use &&/|| instead of and/or.
|
291
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
409
292
|
Enabled: true
|
410
|
-
|
411
293
|
Style/ArrayJoin:
|
412
|
-
Description:
|
413
|
-
StyleGuide:
|
294
|
+
Description: Use Array#join instead of Array#*.
|
295
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
414
296
|
Enabled: false
|
415
|
-
|
416
297
|
Style/AsciiComments:
|
417
|
-
Description:
|
418
|
-
StyleGuide:
|
298
|
+
Description: Use only ascii symbols in comments.
|
299
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
419
300
|
Enabled: false
|
420
|
-
|
421
301
|
Style/AsciiIdentifiers:
|
422
|
-
Description:
|
423
|
-
StyleGuide:
|
302
|
+
Description: Use only ascii symbols in identifiers.
|
303
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
424
304
|
Enabled: false
|
425
|
-
|
426
305
|
Style/Attr:
|
427
|
-
Description:
|
428
|
-
StyleGuide:
|
306
|
+
Description: Checks for uses of Module#attr.
|
307
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
429
308
|
Enabled: true
|
430
|
-
|
431
309
|
Style/BeginBlock:
|
432
|
-
Description:
|
433
|
-
StyleGuide:
|
310
|
+
Description: Avoid the use of BEGIN blocks.
|
311
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
434
312
|
Enabled: true
|
435
|
-
|
436
313
|
Style/BarePercentLiterals:
|
437
|
-
Description:
|
438
|
-
StyleGuide:
|
314
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
315
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
439
316
|
Enabled: true
|
440
|
-
|
441
317
|
Style/BlockComments:
|
442
|
-
Description:
|
443
|
-
StyleGuide:
|
318
|
+
Description: Do not use block comments.
|
319
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
444
320
|
Enabled: false
|
445
|
-
|
446
|
-
|
447
|
-
Description: 'Put end statement of multiline block on its own line.'
|
321
|
+
Layout/BlockEndNewline:
|
322
|
+
Description: Put end statement of multiline block on its own line.
|
448
323
|
Enabled: true
|
449
|
-
|
450
324
|
Style/BlockDelimiters:
|
451
|
-
Description:
|
452
|
-
|
453
|
-
|
454
|
-
Prefer {...} over do...end for single-line blocks.
|
455
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
325
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
326
|
+
ugly). Prefer {...} over do...end for single-line blocks.
|
327
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
456
328
|
Enabled: true
|
457
|
-
|
458
329
|
Style/BracesAroundHashParameters:
|
459
|
-
Description:
|
330
|
+
Description: Enforce braces style around hash parameters.
|
460
331
|
Enabled: false
|
461
|
-
|
462
332
|
Style/CaseEquality:
|
463
|
-
Description:
|
464
|
-
StyleGuide:
|
333
|
+
Description: Avoid explicit use of the case equality operator(===).
|
334
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
465
335
|
Enabled: false
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
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
|
470
339
|
Enabled: true
|
471
|
-
|
472
340
|
Style/CharacterLiteral:
|
473
|
-
Description:
|
474
|
-
StyleGuide:
|
341
|
+
Description: Checks for uses of character literals.
|
342
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
475
343
|
Enabled: false
|
476
|
-
|
477
344
|
Style/ClassAndModuleCamelCase:
|
478
|
-
Description:
|
479
|
-
StyleGuide:
|
345
|
+
Description: Use CamelCase for classes and modules.
|
346
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
480
347
|
Enabled: true
|
481
|
-
|
482
348
|
Style/ClassAndModuleChildren:
|
483
|
-
Description:
|
349
|
+
Description: Checks style of children classes and modules.
|
484
350
|
Enabled: false
|
485
|
-
|
486
351
|
Style/ClassCheck:
|
487
|
-
Description:
|
352
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
488
353
|
Enabled: true
|
489
|
-
|
490
354
|
Style/ClassMethods:
|
491
|
-
Description:
|
492
|
-
StyleGuide:
|
355
|
+
Description: Use self when defining module/class methods.
|
356
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
|
493
357
|
Enabled: false
|
494
|
-
|
495
358
|
Style/ClassVars:
|
496
|
-
Description:
|
497
|
-
StyleGuide:
|
359
|
+
Description: Avoid the use of class variables.
|
360
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
498
361
|
Enabled: false
|
499
|
-
|
500
|
-
|
501
|
-
Description: 'Checks the indentation of hanging closing parentheses.'
|
362
|
+
Layout/ClosingParenthesisIndentation:
|
363
|
+
Description: Checks the indentation of hanging closing parentheses.
|
502
364
|
Enabled: false
|
503
|
-
|
504
365
|
Style/ColonMethodCall:
|
505
366
|
Description: 'Do not use :: for method call.'
|
506
|
-
StyleGuide:
|
367
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
507
368
|
Enabled: true
|
508
|
-
|
509
369
|
Style/CommandLiteral:
|
510
|
-
Description:
|
511
|
-
StyleGuide:
|
370
|
+
Description: Use `` or %x around command literals.
|
371
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
512
372
|
Enabled: false
|
513
|
-
|
514
373
|
Style/CommentAnnotation:
|
515
|
-
Description:
|
516
|
-
StyleGuide:
|
374
|
+
Description: Checks formatting of annotation comments.
|
375
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
517
376
|
Enabled: false
|
518
|
-
|
519
|
-
|
520
|
-
Description: 'Indentation of comments.'
|
377
|
+
Layout/CommentIndentation:
|
378
|
+
Description: Indentation of comments.
|
521
379
|
Enabled: false
|
522
|
-
|
523
380
|
Style/ConstantName:
|
524
|
-
Description:
|
525
|
-
StyleGuide:
|
381
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
382
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
526
383
|
Enabled: true
|
527
|
-
|
528
384
|
Style/DefWithParentheses:
|
529
|
-
Description:
|
530
|
-
StyleGuide:
|
385
|
+
Description: Use def with parentheses when there are arguments.
|
386
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
531
387
|
Enabled: true
|
532
|
-
|
533
388
|
Style/Documentation:
|
534
|
-
Description:
|
389
|
+
Description: Document classes and non-namespace modules.
|
535
390
|
Enabled: false
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
391
|
+
Layout/DotPosition:
|
392
|
+
Description: Checks the position of the dot in multi-line method calls.
|
393
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
540
394
|
Enabled: true
|
541
|
-
|
542
395
|
Style/DoubleNegation:
|
543
|
-
Description:
|
544
|
-
StyleGuide:
|
396
|
+
Description: Checks for uses of double negation (!!).
|
397
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
545
398
|
Enabled: true
|
546
|
-
|
547
399
|
Style/EachWithObject:
|
548
|
-
Description:
|
400
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
549
401
|
Enabled: false
|
550
|
-
|
551
|
-
|
552
|
-
Description: 'Align elses and elsifs correctly.'
|
402
|
+
Layout/ElseAlignment:
|
403
|
+
Description: Align elses and elsifs correctly.
|
553
404
|
Enabled: true
|
554
|
-
|
555
405
|
Style/EmptyElse:
|
556
|
-
Description:
|
406
|
+
Description: Avoid empty else-clauses.
|
557
407
|
Enabled: true
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
408
|
+
Layout/EmptyLineBetweenDefs:
|
409
|
+
Description: Use empty lines between defs.
|
410
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
562
411
|
Enabled: true
|
563
|
-
|
564
|
-
|
565
|
-
Description: "Don't use several empty lines in a row."
|
412
|
+
Layout/EmptyLines:
|
413
|
+
Description: Don't use several empty lines in a row.
|
566
414
|
Enabled: true
|
567
|
-
|
568
|
-
|
569
|
-
Description: "Keep blank lines around access modifiers."
|
415
|
+
Layout/EmptyLinesAroundAccessModifier:
|
416
|
+
Description: Keep blank lines around access modifiers.
|
570
417
|
Enabled: false
|
571
|
-
|
572
|
-
|
573
|
-
Description: "Keeps track of empty lines around block bodies."
|
418
|
+
Layout/EmptyLinesAroundBlockBody:
|
419
|
+
Description: Keeps track of empty lines around block bodies.
|
574
420
|
Enabled: false
|
575
|
-
|
576
|
-
|
577
|
-
Description: "Keeps track of empty lines around class bodies."
|
421
|
+
Layout/EmptyLinesAroundClassBody:
|
422
|
+
Description: Keeps track of empty lines around class bodies.
|
578
423
|
Enabled: false
|
579
|
-
|
580
|
-
|
581
|
-
Description: "Keeps track of empty lines around module bodies."
|
424
|
+
Layout/EmptyLinesAroundModuleBody:
|
425
|
+
Description: Keeps track of empty lines around module bodies.
|
582
426
|
Enabled: false
|
583
|
-
|
584
|
-
|
585
|
-
Description: "Keeps track of empty lines around method bodies."
|
427
|
+
Layout/EmptyLinesAroundMethodBody:
|
428
|
+
Description: Keeps track of empty lines around method bodies.
|
586
429
|
Enabled: false
|
587
|
-
|
588
430
|
Style/EmptyLiteral:
|
589
|
-
Description:
|
590
|
-
StyleGuide:
|
431
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
432
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
591
433
|
Enabled: false
|
592
|
-
|
593
434
|
Style/EndBlock:
|
594
|
-
Description:
|
595
|
-
StyleGuide:
|
435
|
+
Description: Avoid the use of END blocks.
|
436
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
596
437
|
Enabled: false
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
438
|
+
Layout/EndOfLine:
|
439
|
+
Description: Use Unix-style line endings.
|
440
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
601
441
|
Enabled: false
|
602
|
-
|
603
442
|
Style/EvenOdd:
|
604
|
-
Description:
|
605
|
-
StyleGuide:
|
443
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
444
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
606
445
|
Enabled: true
|
607
|
-
|
608
|
-
|
609
|
-
Description: 'Do not use unnecessary spacing.'
|
446
|
+
Layout/ExtraSpacing:
|
447
|
+
Description: Do not use unnecessary spacing.
|
610
448
|
Enabled: true
|
611
|
-
|
612
449
|
Style/FileName:
|
613
|
-
Description:
|
614
|
-
StyleGuide:
|
450
|
+
Description: Use snake_case for source file names.
|
451
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
615
452
|
Enabled: true
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
Checks the indentation of the first non-blank non-comment line in a file.
|
453
|
+
Layout/InitialIndentation:
|
454
|
+
Description: Checks the indentation of the first non-blank non-comment line in a
|
455
|
+
file.
|
620
456
|
Enabled: false
|
621
|
-
|
622
|
-
|
623
|
-
Description: 'Checks the indentation of the first parameter in a method call.'
|
457
|
+
Layout/FirstParameterIndentation:
|
458
|
+
Description: Checks the indentation of the first parameter in a method call.
|
624
459
|
Enabled: false
|
625
|
-
|
626
460
|
Style/FlipFlop:
|
627
|
-
Description:
|
628
|
-
StyleGuide:
|
461
|
+
Description: Checks for flip flops
|
462
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
629
463
|
Enabled: true
|
630
|
-
|
631
464
|
Style/For:
|
632
|
-
Description:
|
633
|
-
StyleGuide:
|
465
|
+
Description: Checks use of for or each in multiline loops.
|
466
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
634
467
|
Enabled: true
|
635
|
-
|
636
468
|
Style/FormatString:
|
637
|
-
Description:
|
638
|
-
StyleGuide:
|
469
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
470
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
639
471
|
Enabled: false
|
640
|
-
|
641
472
|
Style/GlobalVars:
|
642
|
-
Description:
|
643
|
-
StyleGuide:
|
644
|
-
Reference:
|
473
|
+
Description: Do not introduce global variables.
|
474
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
475
|
+
Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
|
645
476
|
Enabled: true
|
646
|
-
|
647
477
|
Style/GuardClause:
|
648
|
-
Description:
|
649
|
-
StyleGuide:
|
478
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
479
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
650
480
|
Enabled: true
|
651
|
-
|
652
481
|
Style/HashSyntax:
|
653
|
-
Description:
|
654
|
-
|
655
|
-
|
656
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
482
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
483
|
+
1, :b => 2 }.'
|
484
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
657
485
|
Enabled: true
|
658
|
-
|
659
486
|
Style/IfUnlessModifier:
|
660
|
-
Description:
|
661
|
-
|
662
|
-
single-line body.
|
663
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
487
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
488
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
664
489
|
Enabled: true
|
665
|
-
|
666
490
|
Style/IfWithSemicolon:
|
667
|
-
Description:
|
668
|
-
StyleGuide:
|
491
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
492
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
669
493
|
Enabled: true
|
670
|
-
|
671
|
-
|
672
|
-
Description: 'Keep indentation straight.'
|
494
|
+
Layout/IndentationConsistency:
|
495
|
+
Description: Keep indentation straight.
|
673
496
|
Enabled: false
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
497
|
+
Layout/IndentationWidth:
|
498
|
+
Description: Use 2 spaces for indentation.
|
499
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
678
500
|
Enabled: true
|
679
|
-
|
680
|
-
|
681
|
-
Description: >-
|
682
|
-
Checks the indentation of the first element in an array
|
683
|
-
literal.
|
501
|
+
Layout/IndentArray:
|
502
|
+
Description: Checks the indentation of the first element in an array literal.
|
684
503
|
Enabled: false
|
685
|
-
|
686
|
-
|
687
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
504
|
+
Layout/IndentHash:
|
505
|
+
Description: Checks the indentation of the first key in a hash literal.
|
688
506
|
Enabled: false
|
689
|
-
|
690
507
|
Style/InfiniteLoop:
|
691
|
-
Description:
|
692
|
-
StyleGuide:
|
508
|
+
Description: Use Kernel#loop for infinite loops.
|
509
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
693
510
|
Enabled: true
|
694
|
-
|
695
511
|
Style/Lambda:
|
696
|
-
Description:
|
697
|
-
StyleGuide:
|
512
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
513
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
698
514
|
Enabled: true
|
699
|
-
|
700
515
|
Style/LambdaCall:
|
701
|
-
Description:
|
702
|
-
StyleGuide:
|
516
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
517
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
703
518
|
Enabled: false
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
519
|
+
Layout/LeadingCommentSpace:
|
520
|
+
Description: Comments should start with a space.
|
521
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
708
522
|
Enabled: true
|
709
|
-
|
710
523
|
Style/LineEndConcatenation:
|
711
|
-
Description:
|
712
|
-
|
713
|
-
line end.
|
524
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
525
|
+
end.
|
714
526
|
Enabled: true
|
715
|
-
|
716
527
|
Style/MethodCallWithoutArgsParentheses:
|
717
|
-
Description:
|
718
|
-
StyleGuide:
|
528
|
+
Description: Do not use parentheses for method calls with no arguments.
|
529
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
719
530
|
Enabled: true
|
720
|
-
|
721
531
|
Style/MethodDefParentheses:
|
722
|
-
Description:
|
723
|
-
|
724
|
-
parentheses.
|
725
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
532
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
533
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
726
534
|
Enabled: true
|
727
|
-
|
728
535
|
Style/MethodName:
|
729
|
-
Description:
|
730
|
-
StyleGuide:
|
536
|
+
Description: Use the configured style when naming methods.
|
537
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
731
538
|
Enabled: false
|
732
|
-
|
733
539
|
Style/ModuleFunction:
|
734
|
-
Description:
|
735
|
-
StyleGuide:
|
540
|
+
Description: Checks for usage of `extend self` in modules.
|
541
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
736
542
|
Enabled: true
|
737
|
-
|
738
543
|
Style/MultilineBlockChain:
|
739
|
-
Description:
|
740
|
-
StyleGuide:
|
544
|
+
Description: Avoid multi-line chains of blocks.
|
545
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
741
546
|
Enabled: false
|
742
|
-
|
743
|
-
|
744
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
547
|
+
Layout/MultilineBlockLayout:
|
548
|
+
Description: Ensures newlines after multiline block do statements.
|
745
549
|
Enabled: true
|
746
|
-
|
747
550
|
Style/MultilineIfThen:
|
748
|
-
Description:
|
749
|
-
StyleGuide:
|
551
|
+
Description: Do not use then for multi-line if/unless.
|
552
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
750
553
|
Enabled: true
|
751
|
-
|
752
|
-
|
753
|
-
Description: >-
|
754
|
-
Checks indentation of binary operations that span more than
|
755
|
-
one line.
|
554
|
+
Layout/MultilineOperationIndentation:
|
555
|
+
Description: Checks indentation of binary operations that span more than one line.
|
756
556
|
Enabled: false
|
757
|
-
|
758
557
|
Style/MultilineTernaryOperator:
|
759
|
-
Description:
|
760
|
-
|
761
|
-
use if/unless instead.
|
762
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
558
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
559
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
763
560
|
Enabled: true
|
764
|
-
|
765
561
|
Style/NegatedIf:
|
766
|
-
Description:
|
767
|
-
|
768
|
-
(or control flow or).
|
769
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
562
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
563
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
770
564
|
Enabled: true
|
771
|
-
|
772
565
|
Style/NegatedWhile:
|
773
|
-
Description:
|
774
|
-
StyleGuide:
|
566
|
+
Description: Favor until over while for negative conditions.
|
567
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
775
568
|
Enabled: true
|
776
|
-
|
777
569
|
Style/NestedTernaryOperator:
|
778
|
-
Description:
|
779
|
-
StyleGuide:
|
570
|
+
Description: Use one expression per branch in a ternary operator.
|
571
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
780
572
|
Enabled: true
|
781
|
-
|
782
573
|
Style/Next:
|
783
|
-
Description:
|
784
|
-
StyleGuide:
|
574
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
575
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
785
576
|
Enabled: true
|
786
|
-
|
787
577
|
Style/NilComparison:
|
788
|
-
Description:
|
789
|
-
StyleGuide:
|
578
|
+
Description: Prefer x.nil? to x == nil.
|
579
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
790
580
|
Enabled: true
|
791
|
-
|
792
581
|
Style/NonNilCheck:
|
793
|
-
Description:
|
794
|
-
StyleGuide:
|
582
|
+
Description: Checks for redundant nil checks.
|
583
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
795
584
|
Enabled: true
|
796
|
-
|
797
585
|
Style/Not:
|
798
|
-
Description:
|
799
|
-
StyleGuide:
|
586
|
+
Description: Use ! instead of not.
|
587
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
800
588
|
Enabled: true
|
801
|
-
|
802
589
|
Style/NumericLiterals:
|
803
|
-
Description:
|
804
|
-
|
805
|
-
readability.
|
806
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
590
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
591
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
807
592
|
Enabled: true
|
808
|
-
|
809
593
|
Style/OneLineConditional:
|
810
|
-
Description:
|
811
|
-
|
812
|
-
if/then/else/end constructs.
|
813
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
594
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
595
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
814
596
|
Enabled: false
|
815
|
-
|
816
597
|
Style/OpMethod:
|
817
|
-
Description:
|
818
|
-
StyleGuide:
|
598
|
+
Description: When defining binary operators, name the argument other.
|
599
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
819
600
|
Enabled: false
|
820
|
-
|
821
601
|
Style/OptionalArguments:
|
822
|
-
Description:
|
823
|
-
|
824
|
-
|
825
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
602
|
+
Description: Checks for optional arguments that do not appear at the end of the
|
603
|
+
argument list
|
604
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
|
826
605
|
Enabled: false
|
827
|
-
|
828
606
|
Style/ParallelAssignment:
|
829
|
-
Description:
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
835
|
-
Enabled: false
|
836
|
-
|
607
|
+
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. This also provides
|
609
|
+
performance benefits
|
610
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
|
611
|
+
Enabled: false
|
837
612
|
Style/ParenthesesAroundCondition:
|
838
|
-
Description:
|
839
|
-
|
840
|
-
if/unless/while.
|
841
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
613
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
614
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
842
615
|
Enabled: true
|
843
|
-
|
844
616
|
Style/PercentLiteralDelimiters:
|
845
|
-
Description:
|
846
|
-
StyleGuide:
|
847
|
-
Enabled: true
|
848
|
-
|
617
|
+
Description: Use `%`-literal delimiters consistently
|
618
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
619
|
+
Enabled: true
|
620
|
+
PreferredDelimiters:
|
621
|
+
default: ()
|
622
|
+
'%i': '()'
|
623
|
+
'%I': '()'
|
624
|
+
'%r': '{}'
|
625
|
+
'%w': '()'
|
626
|
+
'%W': '()'
|
849
627
|
Style/PercentQLiterals:
|
850
|
-
Description:
|
628
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
851
629
|
Enabled: true
|
852
|
-
|
853
630
|
Style/PerlBackrefs:
|
854
|
-
Description:
|
855
|
-
StyleGuide:
|
631
|
+
Description: Avoid Perl-style regex back references.
|
632
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
856
633
|
Enabled: false
|
857
|
-
|
858
634
|
Style/PredicateName:
|
859
|
-
Description:
|
860
|
-
StyleGuide:
|
635
|
+
Description: Check the names of predicate methods.
|
636
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
861
637
|
Enabled: true
|
862
|
-
|
863
638
|
Style/Proc:
|
864
|
-
Description:
|
865
|
-
StyleGuide:
|
639
|
+
Description: Use proc instead of Proc.new.
|
640
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
866
641
|
Enabled: true
|
867
|
-
|
868
642
|
Style/RaiseArgs:
|
869
|
-
Description:
|
870
|
-
StyleGuide:
|
643
|
+
Description: Checks the arguments passed to raise/fail.
|
644
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
871
645
|
Enabled: false
|
872
|
-
|
873
646
|
Style/RedundantBegin:
|
874
|
-
Description:
|
875
|
-
StyleGuide:
|
647
|
+
Description: Don't use begin blocks when they are not needed.
|
648
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
876
649
|
Enabled: true
|
877
|
-
|
878
650
|
Style/RedundantException:
|
879
|
-
Description:
|
880
|
-
StyleGuide:
|
651
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
652
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
881
653
|
Enabled: true
|
882
|
-
|
883
654
|
Style/RedundantReturn:
|
884
|
-
Description:
|
885
|
-
StyleGuide:
|
655
|
+
Description: Don't use return where it's not required.
|
656
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
886
657
|
Enabled: true
|
887
|
-
|
888
658
|
Style/RedundantSelf:
|
889
|
-
Description:
|
890
|
-
StyleGuide:
|
659
|
+
Description: Don't use self where it's not needed.
|
660
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
891
661
|
Enabled: true
|
892
|
-
|
893
662
|
Style/RegexpLiteral:
|
894
|
-
Description:
|
895
|
-
StyleGuide:
|
663
|
+
Description: Use / or %r around regular expressions.
|
664
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
896
665
|
Enabled: false
|
897
|
-
|
898
|
-
|
899
|
-
Description: 'Align rescues and ensures correctly.'
|
666
|
+
Layout/RescueEnsureAlignment:
|
667
|
+
Description: Align rescues and ensures correctly.
|
900
668
|
Enabled: false
|
901
|
-
|
902
669
|
Style/RescueModifier:
|
903
|
-
Description:
|
904
|
-
StyleGuide:
|
670
|
+
Description: Avoid using rescue in its modifier form.
|
671
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
905
672
|
Enabled: false
|
906
|
-
|
907
673
|
Style/SelfAssignment:
|
908
|
-
Description:
|
909
|
-
|
910
|
-
|
911
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
674
|
+
Description: Checks for places where self-assignment shorthand should have been
|
675
|
+
used.
|
676
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
912
677
|
Enabled: true
|
913
|
-
|
914
678
|
Style/Semicolon:
|
915
|
-
Description:
|
916
|
-
StyleGuide:
|
679
|
+
Description: Don't use semicolons to terminate expressions.
|
680
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
917
681
|
Enabled: true
|
918
|
-
|
919
682
|
Style/SignalException:
|
920
|
-
Description:
|
921
|
-
StyleGuide:
|
683
|
+
Description: Checks for proper usage of fail and raise.
|
684
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
922
685
|
Enabled: true
|
923
|
-
|
924
686
|
Style/SingleLineBlockParams:
|
925
|
-
Description:
|
926
|
-
StyleGuide:
|
687
|
+
Description: Enforces the names of some block params.
|
688
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
927
689
|
Enabled: true
|
928
|
-
|
929
690
|
Style/SingleLineMethods:
|
930
|
-
Description:
|
931
|
-
StyleGuide:
|
932
|
-
Enabled: false
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
Description:
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
Enabled: true
|
953
|
-
|
954
|
-
Style/SpaceAfterMethodName:
|
955
|
-
Description: >-
|
956
|
-
Do not put a space between a method name and the opening
|
957
|
-
parenthesis in a method definition.
|
958
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
959
|
-
Enabled: true
|
960
|
-
|
961
|
-
Style/SpaceAfterNot:
|
691
|
+
Description: Avoid single-line methods.
|
692
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
693
|
+
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:
|
962
715
|
Description: Tracks redundant space after the ! operator.
|
963
|
-
StyleGuide:
|
964
|
-
Enabled: false
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
Description:
|
983
|
-
|
984
|
-
|
985
|
-
Enabled: false
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
Description:
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
Description:
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
Description:
|
1012
|
-
StyleGuide:
|
1013
|
-
Enabled: true
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
Enabled: false
|
1019
|
-
|
1020
|
-
Style/SpaceInsideHashLiteralBraces:
|
1021
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
1022
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
1023
|
-
Enabled: false
|
1024
|
-
|
1025
|
-
Style/SpaceInsideParens:
|
1026
|
-
Description: 'No spaces after ( or before ).'
|
1027
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
1028
|
-
Enabled: true
|
1029
|
-
|
1030
|
-
Style/SpaceInsideRangeLiteral:
|
1031
|
-
Description: 'No spaces inside range literals.'
|
1032
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
1033
|
-
Enabled: true
|
1034
|
-
|
1035
|
-
Style/SpaceInsideStringInterpolation:
|
1036
|
-
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
1037
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
1038
|
-
Enabled: false
|
1039
|
-
|
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
|
1040
771
|
Style/SpecialGlobalVars:
|
1041
|
-
Description:
|
1042
|
-
StyleGuide:
|
772
|
+
Description: Avoid Perl-style global variables.
|
773
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
1043
774
|
Enabled: false
|
1044
|
-
|
1045
775
|
Style/StringLiterals:
|
1046
|
-
Description:
|
1047
|
-
StyleGuide:
|
776
|
+
Description: Checks if uses of quotes match the configured preference.
|
777
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
1048
778
|
EnforcedStyle: double_quotes
|
1049
779
|
Enabled: true
|
1050
|
-
|
1051
780
|
Style/StringLiteralsInInterpolation:
|
1052
|
-
Description:
|
1053
|
-
|
1054
|
-
strings match the configured preference.
|
781
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
782
|
+
match the configured preference.
|
1055
783
|
Enabled: true
|
1056
|
-
|
1057
784
|
Style/StructInheritance:
|
1058
|
-
Description:
|
1059
|
-
StyleGuide:
|
785
|
+
Description: Checks for inheritance from Struct.new.
|
786
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
1060
787
|
Enabled: false
|
1061
|
-
|
1062
788
|
Style/SymbolLiteral:
|
1063
|
-
Description:
|
789
|
+
Description: Use plain symbols instead of string symbols when possible.
|
1064
790
|
Enabled: false
|
1065
|
-
|
1066
791
|
Style/SymbolProc:
|
1067
|
-
Description:
|
792
|
+
Description: Use symbols as procs instead of blocks when possible.
|
1068
793
|
Enabled: false
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
794
|
+
Layout/Tab:
|
795
|
+
Description: No hard tabs.
|
796
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
1073
797
|
Enabled: false
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
798
|
+
Layout/TrailingBlankLines:
|
799
|
+
Description: Checks trailing blank lines and final newline.
|
800
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
1078
801
|
Enabled: false
|
1079
|
-
|
1080
802
|
Style/TrailingCommaInArguments:
|
1081
|
-
Description:
|
1082
|
-
StyleGuide:
|
803
|
+
Description: Checks for trailing comma in parameter lists.
|
804
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma
|
1083
805
|
Enabled: false
|
1084
|
-
|
1085
806
|
Style/TrailingCommaInLiteral:
|
1086
|
-
Description:
|
1087
|
-
StyleGuide:
|
807
|
+
Description: Checks for trailing comma in literals.
|
808
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
1088
809
|
Enabled: false
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
810
|
+
Layout/TrailingWhitespace:
|
811
|
+
Description: Avoid trailing whitespace.
|
812
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
1093
813
|
Enabled: false
|
1094
|
-
|
1095
814
|
Style/TrivialAccessors:
|
1096
|
-
Description:
|
1097
|
-
StyleGuide:
|
815
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
816
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
1098
817
|
Enabled: false
|
1099
|
-
|
1100
818
|
Style/UnlessElse:
|
1101
|
-
Description:
|
1102
|
-
|
1103
|
-
case first.
|
1104
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
819
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
820
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
1105
821
|
Enabled: true
|
1106
|
-
|
1107
822
|
Style/UnneededCapitalW:
|
1108
|
-
Description:
|
823
|
+
Description: Checks for %W when interpolation is not needed.
|
1109
824
|
Enabled: false
|
1110
|
-
|
1111
825
|
Style/UnneededPercentQ:
|
1112
|
-
Description:
|
1113
|
-
StyleGuide:
|
826
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
827
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
1114
828
|
Enabled: false
|
1115
|
-
|
1116
829
|
Style/TrailingUnderscoreVariable:
|
1117
|
-
Description:
|
1118
|
-
|
1119
|
-
end of parallel variable assignment.
|
830
|
+
Description: Checks for the usage of unneeded trailing underscores at the end of
|
831
|
+
parallel variable assignment.
|
1120
832
|
Enabled: false
|
1121
|
-
|
1122
833
|
Style/VariableInterpolation:
|
1123
|
-
Description:
|
1124
|
-
|
1125
|
-
|
1126
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
834
|
+
Description: Don't interpolate global, instance and class variables directly in
|
835
|
+
strings.
|
836
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
1127
837
|
Enabled: true
|
1128
|
-
|
1129
838
|
Style/VariableName:
|
1130
|
-
Description:
|
1131
|
-
StyleGuide:
|
839
|
+
Description: Use the configured style when naming variables.
|
840
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
1132
841
|
Enabled: true
|
1133
|
-
|
1134
842
|
Style/WhenThen:
|
1135
|
-
Description:
|
1136
|
-
StyleGuide:
|
843
|
+
Description: Use when x then ... for one-line cases.
|
844
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
1137
845
|
Enabled: true
|
1138
|
-
|
1139
846
|
Style/WhileUntilDo:
|
1140
|
-
Description:
|
1141
|
-
StyleGuide:
|
847
|
+
Description: Checks for redundant do after while or until.
|
848
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
1142
849
|
Enabled: true
|
1143
|
-
|
1144
850
|
Style/WhileUntilModifier:
|
1145
|
-
Description:
|
1146
|
-
|
1147
|
-
single-line body.
|
1148
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
851
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
852
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
1149
853
|
Enabled: true
|
1150
|
-
|
1151
854
|
Style/MutableConstant:
|
1152
855
|
Enabled: true
|
1153
|
-
|
1154
856
|
Style/FrozenStringLiteralComment:
|
1155
857
|
Enabled: true
|
1156
|
-
|
1157
858
|
Style/WordArray:
|
1158
|
-
Description:
|
1159
|
-
StyleGuide:
|
859
|
+
Description: Use %w or %W for arrays of words.
|
860
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
1160
861
|
Enabled: true
|
1161
|
-
|
1162
862
|
Style/EmptyMethod:
|
1163
863
|
Enabled: false
|
1164
|
-
|
1165
864
|
Security/Eval:
|
1166
|
-
Description:
|
865
|
+
Description: The use of eval represents a serious security risk.
|
1167
866
|
Enabled: true
|
1168
|
-
|
1169
|
-
AllCops:
|
1170
|
-
Exclude:
|
1171
|
-
- 'vendor/**/*'
|
1172
|
-
- 'db/**/*'
|
1173
|
-
- 'Gemfile.lock'
|
1174
|
-
- 'Rakefile'
|
1175
|
-
TargetRubyVersion: <%= RUBY_VERSION.split(".")[0..1].join('.') %>
|