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