1
1
# This configuration was generated by
2
2
# `rubocop --auto-gen-config`
3
- # on 2019-12-09 18:07:42 +0100 using RuboCop version 0.51.0 .
3
+ # on 2020-03-02 11:38:28 +0100 using RuboCop version 0.80.1 .
4
4
# The point is for the user to remove these configuration records
5
5
# one by one as the offenses are removed from the code base.
6
6
# Note that changes in the inspected code, or installation of new
7
7
# versions of RuboCop, may require this file to be generated again.
8
8
9
+ # Offense count: 6
10
+ # Cop supports --auto-correct.
11
+ Layout/ClosingHeredocIndentation :
12
+ Exclude :
13
+ - ' spec/grape/api_spec.rb'
14
+ - ' spec/grape/entity_spec.rb'
15
+
16
+ # Offense count: 72
17
+ # Cop supports --auto-correct.
18
+ Layout/EmptyLineAfterGuardClause :
19
+ Enabled : false
20
+
21
+ # Offense count: 27
22
+ # Cop supports --auto-correct.
23
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
24
+ # SupportedHashRocketStyles: key, separator, table
25
+ # SupportedColonStyles: key, separator, table
26
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
27
+ Layout/HashAlignment :
28
+ Exclude :
29
+ - ' grape.gemspec'
30
+ - ' lib/grape/validations/params_scope.rb'
31
+ - ' lib/grape/validations/types/primitive_coercer.rb'
32
+ - ' spec/grape/api_spec.rb'
33
+ - ' spec/grape/entity_spec.rb'
34
+
9
35
# Offense count: 7
10
36
# Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyle, SupportedStyles .
12
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
13
- Layout/IndentHeredoc :
37
+ # Configuration parameters: EnforcedStyle.
38
+ # SupportedStyles: squiggly, active_support, powerpack, unindent
39
+ Layout/HeredocIndentation :
14
40
Exclude :
15
41
- ' lib/grape/router/route.rb'
16
42
- ' spec/grape/api_spec.rb'
@@ -21,23 +47,45 @@ Lint/AmbiguousBlockAssociation:
21
47
Exclude :
22
48
- ' spec/grape/dsl/routing_spec.rb'
23
49
50
+ # Offense count: 4
51
+ Lint/DisjunctiveAssignmentInConstructor :
52
+ Exclude :
53
+ - ' lib/grape/namespace.rb'
54
+ - ' lib/grape/path.rb'
55
+ - ' lib/grape/router.rb'
56
+ - ' lib/grape/router/pattern.rb'
57
+
24
58
# Offense count: 1
25
- Lint/RescueWithoutErrorClass :
59
+ # Cop supports --auto-correct.
60
+ Lint/NonDeterministicRequireOrder :
26
61
Exclude :
27
- - ' lib/grape/validations/validators/coerce.rb'
62
+ - ' spec/spec_helper.rb'
63
+
64
+ # Offense count: 1
65
+ # Cop supports --auto-correct.
66
+ Lint/RedundantCopDisableDirective :
67
+ Exclude :
68
+ - ' lib/grape/router/attribute_translator.rb'
28
69
29
70
# Offense count: 1
30
71
# Cop supports --auto-correct.
31
- Lint/UnneededRequireStatement :
72
+ Lint/RedundantRequireStatement :
32
73
Exclude :
33
74
- ' lib/grape.rb'
34
75
35
- # Offense count: 46
76
+ # Offense count: 2
77
+ # Cop supports --auto-correct.
78
+ Lint/ToJSON :
79
+ Exclude :
80
+ - ' spec/grape/middleware/formatter_spec.rb'
81
+
82
+ # Offense count: 48
36
83
Metrics/AbcSize :
37
- Max : 44
84
+ Max : 43
38
85
39
- # Offense count: 7
86
+ # Offense count: 6
40
87
# Configuration parameters: CountComments, ExcludedMethods.
88
+ # ExcludedMethods: refine
41
89
Metrics/BlockLength :
42
90
Max : 182
43
91
@@ -46,18 +94,12 @@ Metrics/BlockLength:
46
94
Metrics/ClassLength :
47
95
Max : 305
48
96
49
- # Offense count: 30
97
+ # Offense count: 32
50
98
Metrics/CyclomaticComplexity :
51
99
Max : 14
52
100
53
- # Offense count: 1300
54
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
55
- # URISchemes: http, https
56
- Metrics/LineLength :
57
- Max : 215
58
-
59
- # Offense count: 60
60
- # Configuration parameters: CountComments.
101
+ # Offense count: 61
102
+ # Configuration parameters: CountComments, ExcludedMethods.
61
103
Metrics/MethodLength :
62
104
Max : 33
63
105
@@ -66,54 +108,164 @@ Metrics/MethodLength:
66
108
Metrics/ModuleLength :
67
109
Max : 220
68
110
69
- # Offense count: 22
111
+ # Offense count: 25
70
112
Metrics/PerceivedComplexity :
71
113
Max : 14
72
114
73
- # Offense count: 4
74
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
75
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
76
- Naming/FileName :
115
+ # Offense count: 3
116
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
117
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
118
+ Naming/MemoizedInstanceVariableName :
119
+ Exclude :
120
+ - ' lib/grape/api/instance.rb'
121
+ - ' lib/grape/middleware/base.rb'
122
+ - ' spec/grape/integration/rack_spec.rb'
123
+
124
+ # Offense count: 5
125
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
126
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
127
+ Naming/MethodParameterName :
128
+ Exclude :
129
+ - ' lib/grape/endpoint.rb'
130
+ - ' lib/grape/middleware/error.rb'
131
+ - ' lib/grape/middleware/stack.rb'
132
+ - ' spec/grape/api_spec.rb'
133
+
134
+ # Offense count: 1
135
+ # Cop supports --auto-correct.
136
+ # Configuration parameters: PreferredName.
137
+ Naming/RescuedExceptionsVariableName :
138
+ Exclude :
139
+ - ' lib/grape/middleware/error.rb'
140
+
141
+ # Offense count: 3
142
+ # Cop supports --auto-correct.
143
+ Performance/InefficientHashSearch :
77
144
Exclude :
78
- - ' Appraisals'
79
- - ' Gemfile'
80
- - ' Guardfile'
81
- - ' Rakefile'
145
+ - ' spec/grape/validations/validators/values_spec.rb'
82
146
83
147
# Offense count: 1
84
148
# Cop supports --auto-correct.
85
149
Performance/RegexpMatch :
86
150
Exclude :
87
151
- ' lib/grape/middleware/versioner/path.rb'
88
152
153
+ # Offense count: 5
154
+ # Cop supports --auto-correct.
155
+ Style/EmptyLambdaParameter :
156
+ Exclude :
157
+ - ' spec/grape/dsl/callbacks_spec.rb'
158
+ - ' spec/grape/dsl/middleware_spec.rb'
159
+ - ' spec/grape/dsl/routing_spec.rb'
160
+ - ' spec/grape/middleware/auth/dsl_spec.rb'
161
+ - ' spec/grape/middleware/stack_spec.rb'
162
+
163
+ # Offense count: 3
164
+ # Cop supports --auto-correct.
165
+ Style/ExpandPathArguments :
166
+ Exclude :
167
+ - ' grape.gemspec'
168
+ - ' lib/grape.rb'
169
+ - ' spec/grape/validations/validators/coerce_spec.rb'
170
+
89
171
# Offense count: 2
90
- # Configuration parameters: SupportedStyles .
91
- # SupportedStyles: annotated, template
172
+ # Configuration parameters: .
173
+ # SupportedStyles: annotated, template, unannotated
92
174
Style/FormatStringToken :
93
175
EnforcedStyle : template
94
176
95
177
# Offense count: 1
96
178
# Cop supports --auto-correct.
97
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
179
+ Style/HashTransformValues :
180
+ Exclude :
181
+ - ' lib/grape/api.rb'
182
+
183
+ # Offense count: 23
184
+ # Cop supports --auto-correct.
185
+ Style/IfUnlessModifier :
186
+ Exclude :
187
+ - ' lib/grape/api/instance.rb'
188
+ - ' lib/grape/dsl/desc.rb'
189
+ - ' lib/grape/dsl/request_response.rb'
190
+ - ' lib/grape/dsl/routing.rb'
191
+ - ' lib/grape/dsl/settings.rb'
192
+ - ' lib/grape/endpoint.rb'
193
+ - ' lib/grape/error_formatter/json.rb'
194
+ - ' lib/grape/error_formatter/xml.rb'
195
+ - ' lib/grape/middleware/error.rb'
196
+ - ' lib/grape/middleware/formatter.rb'
197
+ - ' lib/grape/middleware/versioner/accept_version_header.rb'
198
+ - ' lib/grape/validations/params_scope.rb'
199
+ - ' lib/grape/validations/validators/base.rb'
200
+ - ' lib/grape/validations/validators/default.rb'
201
+ - ' spec/support/versioned_helpers.rb'
202
+
203
+ # Offense count: 1
204
+ Style/MethodMissingSuper :
205
+ Exclude :
206
+ - ' lib/grape/router/attribute_translator.rb'
207
+
208
+ # Offense count: 5
209
+ # Cop supports --auto-correct.
210
+ # Configuration parameters: EnforcedStyle.
211
+ # SupportedStyles: literals, strict
212
+ Style/MutableConstant :
213
+ Exclude :
214
+ - ' lib/grape/middleware/versioner/header.rb'
215
+ - ' lib/grape/router/route.rb'
216
+
217
+ # Offense count: 1
218
+ # Cop supports --auto-correct.
219
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
98
220
# SupportedStyles: predicate, comparison
99
221
Style/NumericPredicate :
100
222
Exclude :
101
223
- ' spec/**/*'
102
224
- ' lib/grape/middleware/formatter.rb'
103
225
104
- # Offense count: 12
226
+ # Offense count: 1
227
+ # Cop supports --auto-correct.
228
+ # Configuration parameters: EnforcedStyle.
229
+ # SupportedStyles: implicit, explicit
230
+ Style/RescueStandardError :
231
+ Exclude :
232
+ - ' lib/grape/validations/validators/coerce.rb'
233
+
234
+ # Offense count: 11
105
235
# Cop supports --auto-correct.
106
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil.
236
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
237
+ # AllowedMethods: present?, blank?, presence, try, try!
107
238
Style/SafeNavigation :
108
239
Exclude :
109
240
- ' lib/grape/api/instance.rb'
110
241
- ' lib/grape/dsl/desc.rb'
111
- - ' lib/grape/dsl/helpers.rb'
112
242
- ' lib/grape/dsl/inside_route.rb'
113
- - ' lib/grape/dsl/routing .rb'
243
+ - ' lib/grape/dsl/request_response .rb'
114
244
- ' lib/grape/endpoint.rb'
115
245
- ' lib/grape/middleware/error.rb'
116
246
- ' lib/grape/middleware/versioner/accept_version_header.rb'
117
247
- ' lib/grape/middleware/versioner/header.rb'
118
- - ' lib/grape/middleware/versioner/param.rb'
119
- - ' lib/grape/middleware/versioner/path.rb'
248
+
249
+ # Offense count: 2
250
+ # Cop supports --auto-correct.
251
+ # Configuration parameters: EnforcedStyleForMultiline.
252
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
253
+ Style/TrailingCommaInHashLiteral :
254
+ Exclude :
255
+ - ' lib/grape/middleware/error.rb'
256
+
257
+ # Offense count: 10
258
+ # Cop supports --auto-correct.
259
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
260
+ # SupportedStyles: percent, brackets
261
+ Style/WordArray :
262
+ Exclude :
263
+ - ' spec/grape/validations/validators/except_values_spec.rb'
264
+ - ' spec/grape/validations/validators/values_spec.rb'
265
+
266
+ # Offense count: 1314
267
+ # Cop supports --auto-correct.
268
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
269
+ # URISchemes: http, https
270
+ Layout/LineLength :
271
+ Max : 215
0 commit comments