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