rubocop-shopify 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/rubocop-cli.yml +47 -0
- data/rubocop.yml +1020 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dc98851f9b8f1ceb71bae8be0d9186250c745f0fe569be93e448634b4691d292
|
4
|
+
data.tar.gz: 84a85af5e51511ad7ff1ba4ae1bc46200cfb36e3e4cc7f6f809fb7414ba9e92f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b0f486b96710cf9b4e1186514f967b34e8f56265b50b769686c55bebbfcc0c4614687b09317ec8df22ae8b814e1d0e101a519ddc6fd9e90f23cf4301163cb00
|
7
|
+
data.tar.gz: 6e1ea5aaa4e500b07c1af3e0d772da81b8b1f46c09c0455de1527aedfc39104151a2f238165336d335575c13681219e3ec03657132ddc9cf0b2a231660ee4630
|
data/rubocop-cli.yml
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- http://shopify.github.io/ruby-style-guide/rubocop.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
# We don't always use bundler to make for a faster boot time.
|
6
|
+
# In this case we vendor a small number of dependencies we absolutely
|
7
|
+
# require. Since they are vendored and 3rd party we do not impose our
|
8
|
+
# styleguide on them but they are still in the repo.
|
9
|
+
Exclude:
|
10
|
+
- 'vendor/**/*'
|
11
|
+
|
12
|
+
# Mac OS High Sierra ships with Ruby 2.3.x
|
13
|
+
# Therefore we target Ruby 2.3
|
14
|
+
TargetRubyVersion: 2.3
|
15
|
+
|
16
|
+
# We disable this at entrypoint.
|
17
|
+
# Due to CLI apps being invoked via an entry point,
|
18
|
+
# we can exclude this from all files
|
19
|
+
Style/FrozenStringLiteralComment:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
# This doesn't take into account retrying from an exception. E.g.:
|
23
|
+
# begin
|
24
|
+
# retries ||= 0
|
25
|
+
# do_a_thing
|
26
|
+
# rescue => e
|
27
|
+
# retry if (retries += 1) < 3
|
28
|
+
# handle_error(e)
|
29
|
+
# end
|
30
|
+
Lint/SuppressedException:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
# Allow the use of globals which occasionally makes sense in a CLI app
|
34
|
+
# As we are not multi-threaded and have a single entry point, this makes it easy to,
|
35
|
+
# for example, track process environments to restore at the end of invocation
|
36
|
+
Style/GlobalVars:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# Allow readable block formatting in some weird cases
|
40
|
+
# Particularly in something like:
|
41
|
+
# Dev::Util.begin do
|
42
|
+
# might_raise_if_costly_prep_not_done()
|
43
|
+
# end.retry_after(ExpectedError) do
|
44
|
+
# costly_prep()
|
45
|
+
# end
|
46
|
+
Style/MultilineBlockChain:
|
47
|
+
Enabled: false
|
data/rubocop.yml
ADDED
@@ -0,0 +1,1020 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'db/schema.rb'
|
4
|
+
DisabledByDefault: true
|
5
|
+
StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
|
6
|
+
|
7
|
+
Lint/AssignmentInCondition:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
Layout/AccessModifierIndentation:
|
11
|
+
EnforcedStyle: indent
|
12
|
+
SupportedStyles:
|
13
|
+
- outdent
|
14
|
+
- indent
|
15
|
+
IndentationWidth:
|
16
|
+
|
17
|
+
Style/Alias:
|
18
|
+
EnforcedStyle: prefer_alias_method
|
19
|
+
SupportedStyles:
|
20
|
+
- prefer_alias
|
21
|
+
- prefer_alias_method
|
22
|
+
|
23
|
+
Layout/HashAlignment:
|
24
|
+
EnforcedHashRocketStyle: key
|
25
|
+
EnforcedColonStyle: key
|
26
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
27
|
+
SupportedLastArgumentHashStyles:
|
28
|
+
- always_inspect
|
29
|
+
- always_ignore
|
30
|
+
- ignore_implicit
|
31
|
+
- ignore_explicit
|
32
|
+
|
33
|
+
Layout/ParameterAlignment:
|
34
|
+
EnforcedStyle: with_fixed_indentation
|
35
|
+
SupportedStyles:
|
36
|
+
- with_first_parameter
|
37
|
+
- with_fixed_indentation
|
38
|
+
IndentationWidth:
|
39
|
+
|
40
|
+
Style/AndOr:
|
41
|
+
EnforcedStyle: always
|
42
|
+
SupportedStyles:
|
43
|
+
- always
|
44
|
+
- conditionals
|
45
|
+
|
46
|
+
Style/BarePercentLiterals:
|
47
|
+
EnforcedStyle: bare_percent
|
48
|
+
SupportedStyles:
|
49
|
+
- percent_q
|
50
|
+
- bare_percent
|
51
|
+
|
52
|
+
Style/BlockDelimiters:
|
53
|
+
EnforcedStyle: line_count_based
|
54
|
+
SupportedStyles:
|
55
|
+
- line_count_based
|
56
|
+
- semantic
|
57
|
+
- braces_for_chaining
|
58
|
+
ProceduralMethods:
|
59
|
+
- benchmark
|
60
|
+
- bm
|
61
|
+
- bmbm
|
62
|
+
- create
|
63
|
+
- each_with_object
|
64
|
+
- measure
|
65
|
+
- new
|
66
|
+
- realtime
|
67
|
+
- tap
|
68
|
+
- with_object
|
69
|
+
FunctionalMethods:
|
70
|
+
- let
|
71
|
+
- let!
|
72
|
+
- subject
|
73
|
+
- watch
|
74
|
+
IgnoredMethods:
|
75
|
+
- lambda
|
76
|
+
- proc
|
77
|
+
- it
|
78
|
+
|
79
|
+
Layout/CaseIndentation:
|
80
|
+
EnforcedStyle: end
|
81
|
+
SupportedStyles:
|
82
|
+
- case
|
83
|
+
- end
|
84
|
+
IndentOneStep: false
|
85
|
+
IndentationWidth:
|
86
|
+
|
87
|
+
Style/ClassAndModuleChildren:
|
88
|
+
EnforcedStyle: nested
|
89
|
+
SupportedStyles:
|
90
|
+
- nested
|
91
|
+
- compact
|
92
|
+
|
93
|
+
Style/ClassCheck:
|
94
|
+
EnforcedStyle: is_a?
|
95
|
+
SupportedStyles:
|
96
|
+
- is_a?
|
97
|
+
- kind_of?
|
98
|
+
|
99
|
+
Style/CommandLiteral:
|
100
|
+
EnforcedStyle: percent_x
|
101
|
+
SupportedStyles:
|
102
|
+
- backticks
|
103
|
+
- percent_x
|
104
|
+
- mixed
|
105
|
+
AllowInnerBackticks: false
|
106
|
+
|
107
|
+
Style/CommentAnnotation:
|
108
|
+
Keywords:
|
109
|
+
- TODO
|
110
|
+
- FIXME
|
111
|
+
- OPTIMIZE
|
112
|
+
- HACK
|
113
|
+
- REVIEW
|
114
|
+
|
115
|
+
Style/ConditionalAssignment:
|
116
|
+
EnforcedStyle: assign_to_condition
|
117
|
+
SupportedStyles:
|
118
|
+
- assign_to_condition
|
119
|
+
- assign_inside_condition
|
120
|
+
SingleLineConditionsOnly: true
|
121
|
+
|
122
|
+
Layout/DotPosition:
|
123
|
+
EnforcedStyle: leading
|
124
|
+
SupportedStyles:
|
125
|
+
- leading
|
126
|
+
- trailing
|
127
|
+
|
128
|
+
Style/EmptyElse:
|
129
|
+
EnforcedStyle: both
|
130
|
+
SupportedStyles:
|
131
|
+
- empty
|
132
|
+
- nil
|
133
|
+
- both
|
134
|
+
|
135
|
+
Layout/EmptyLineBetweenDefs:
|
136
|
+
AllowAdjacentOneLineDefs: false
|
137
|
+
|
138
|
+
Layout/EmptyLinesAroundBlockBody:
|
139
|
+
EnforcedStyle: no_empty_lines
|
140
|
+
SupportedStyles:
|
141
|
+
- empty_lines
|
142
|
+
- no_empty_lines
|
143
|
+
|
144
|
+
Layout/EmptyLinesAroundClassBody:
|
145
|
+
EnforcedStyle: no_empty_lines
|
146
|
+
SupportedStyles:
|
147
|
+
- empty_lines
|
148
|
+
- empty_lines_except_namespace
|
149
|
+
- no_empty_lines
|
150
|
+
|
151
|
+
Layout/EmptyLinesAroundModuleBody:
|
152
|
+
EnforcedStyle: no_empty_lines
|
153
|
+
SupportedStyles:
|
154
|
+
- empty_lines
|
155
|
+
- empty_lines_except_namespace
|
156
|
+
- no_empty_lines
|
157
|
+
|
158
|
+
Layout/ExtraSpacing:
|
159
|
+
AllowForAlignment: true
|
160
|
+
ForceEqualSignAlignment: false
|
161
|
+
|
162
|
+
Naming/FileName:
|
163
|
+
Exclude: []
|
164
|
+
ExpectMatchingDefinition: false
|
165
|
+
Regex:
|
166
|
+
IgnoreExecutableScripts: true
|
167
|
+
|
168
|
+
Layout/FirstArgumentIndentation:
|
169
|
+
EnforcedStyle: consistent
|
170
|
+
SupportedStyles:
|
171
|
+
- consistent
|
172
|
+
- special_for_inner_method_call
|
173
|
+
- special_for_inner_method_call_in_parentheses
|
174
|
+
IndentationWidth:
|
175
|
+
|
176
|
+
Style/For:
|
177
|
+
EnforcedStyle: each
|
178
|
+
SupportedStyles:
|
179
|
+
- for
|
180
|
+
- each
|
181
|
+
|
182
|
+
Style/FormatString:
|
183
|
+
EnforcedStyle: format
|
184
|
+
SupportedStyles:
|
185
|
+
- format
|
186
|
+
- sprintf
|
187
|
+
- percent
|
188
|
+
|
189
|
+
Style/FrozenStringLiteralComment:
|
190
|
+
Details: >-
|
191
|
+
Add `# frozen_string_literal: true` to the top of the file. Frozen string
|
192
|
+
literals will become the default in a future Ruby version, and we want to
|
193
|
+
make sure we're ready.
|
194
|
+
EnforcedStyle: always
|
195
|
+
SupportedStyles:
|
196
|
+
- always
|
197
|
+
- never
|
198
|
+
|
199
|
+
Style/GlobalVars:
|
200
|
+
AllowedVariables: []
|
201
|
+
|
202
|
+
Style/HashSyntax:
|
203
|
+
EnforcedStyle: ruby19
|
204
|
+
SupportedStyles:
|
205
|
+
- ruby19
|
206
|
+
- hash_rockets
|
207
|
+
- no_mixed_keys
|
208
|
+
- ruby19_no_mixed_keys
|
209
|
+
UseHashRocketsWithSymbolValues: false
|
210
|
+
PreferHashRocketsForNonAlnumEndingSymbols: false
|
211
|
+
|
212
|
+
Layout/IndentationConsistency:
|
213
|
+
EnforcedStyle: normal
|
214
|
+
SupportedStyles:
|
215
|
+
- normal
|
216
|
+
- rails
|
217
|
+
|
218
|
+
Layout/IndentationWidth:
|
219
|
+
Width: 2
|
220
|
+
|
221
|
+
Layout/FirstArrayElementIndentation:
|
222
|
+
EnforcedStyle: consistent
|
223
|
+
SupportedStyles:
|
224
|
+
- special_inside_parentheses
|
225
|
+
- consistent
|
226
|
+
- align_brackets
|
227
|
+
IndentationWidth:
|
228
|
+
|
229
|
+
Layout/AssignmentIndentation:
|
230
|
+
IndentationWidth:
|
231
|
+
|
232
|
+
Layout/FirstHashElementIndentation:
|
233
|
+
EnforcedStyle: consistent
|
234
|
+
SupportedStyles:
|
235
|
+
- special_inside_parentheses
|
236
|
+
- consistent
|
237
|
+
- align_braces
|
238
|
+
IndentationWidth:
|
239
|
+
|
240
|
+
Style/LambdaCall:
|
241
|
+
EnforcedStyle: call
|
242
|
+
SupportedStyles:
|
243
|
+
- call
|
244
|
+
- braces
|
245
|
+
|
246
|
+
Style/Next:
|
247
|
+
EnforcedStyle: skip_modifier_ifs
|
248
|
+
MinBodyLength: 3
|
249
|
+
SupportedStyles:
|
250
|
+
- skip_modifier_ifs
|
251
|
+
- always
|
252
|
+
|
253
|
+
Style/NonNilCheck:
|
254
|
+
IncludeSemanticChanges: false
|
255
|
+
|
256
|
+
Style/MethodCallWithArgsParentheses:
|
257
|
+
Enabled: true
|
258
|
+
IgnoreMacros: true
|
259
|
+
IgnoredMethods:
|
260
|
+
- require
|
261
|
+
- require_relative
|
262
|
+
- require_dependency
|
263
|
+
- yield
|
264
|
+
- raise
|
265
|
+
- puts
|
266
|
+
Exclude:
|
267
|
+
- Gemfile
|
268
|
+
|
269
|
+
Style/MethodDefParentheses:
|
270
|
+
EnforcedStyle: require_parentheses
|
271
|
+
SupportedStyles:
|
272
|
+
- require_parentheses
|
273
|
+
- require_no_parentheses
|
274
|
+
- require_no_parentheses_except_multiline
|
275
|
+
|
276
|
+
Naming/MethodName:
|
277
|
+
EnforcedStyle: snake_case
|
278
|
+
SupportedStyles:
|
279
|
+
- snake_case
|
280
|
+
- camelCase
|
281
|
+
|
282
|
+
Layout/MultilineArrayBraceLayout:
|
283
|
+
EnforcedStyle: symmetrical
|
284
|
+
SupportedStyles:
|
285
|
+
- symmetrical
|
286
|
+
- new_line
|
287
|
+
- same_line
|
288
|
+
|
289
|
+
Layout/MultilineHashBraceLayout:
|
290
|
+
EnforcedStyle: symmetrical
|
291
|
+
SupportedStyles:
|
292
|
+
- symmetrical
|
293
|
+
- new_line
|
294
|
+
- same_line
|
295
|
+
|
296
|
+
Layout/MultilineMethodCallBraceLayout:
|
297
|
+
EnforcedStyle: symmetrical
|
298
|
+
SupportedStyles:
|
299
|
+
- symmetrical
|
300
|
+
- new_line
|
301
|
+
- same_line
|
302
|
+
|
303
|
+
Layout/MultilineMethodCallIndentation:
|
304
|
+
EnforcedStyle: indented
|
305
|
+
SupportedStyles:
|
306
|
+
- aligned
|
307
|
+
- indented
|
308
|
+
- indented_relative_to_receiver
|
309
|
+
IndentationWidth: 2
|
310
|
+
|
311
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
312
|
+
EnforcedStyle: symmetrical
|
313
|
+
SupportedStyles:
|
314
|
+
- symmetrical
|
315
|
+
- new_line
|
316
|
+
- same_line
|
317
|
+
|
318
|
+
Style/NumericLiteralPrefix:
|
319
|
+
EnforcedOctalStyle: zero_only
|
320
|
+
SupportedOctalStyles:
|
321
|
+
- zero_with_o
|
322
|
+
- zero_only
|
323
|
+
|
324
|
+
Style/ParenthesesAroundCondition:
|
325
|
+
AllowSafeAssignment: true
|
326
|
+
|
327
|
+
Style/PercentQLiterals:
|
328
|
+
EnforcedStyle: lower_case_q
|
329
|
+
SupportedStyles:
|
330
|
+
- lower_case_q
|
331
|
+
- upper_case_q
|
332
|
+
|
333
|
+
Naming/PredicateName:
|
334
|
+
NamePrefix:
|
335
|
+
- is_
|
336
|
+
ForbiddenPrefixes:
|
337
|
+
- is_
|
338
|
+
AllowedMethods:
|
339
|
+
- is_a?
|
340
|
+
Exclude:
|
341
|
+
- 'spec/**/*'
|
342
|
+
|
343
|
+
Style/PreferredHashMethods:
|
344
|
+
EnforcedStyle: short
|
345
|
+
SupportedStyles:
|
346
|
+
- short
|
347
|
+
- verbose
|
348
|
+
|
349
|
+
Style/RaiseArgs:
|
350
|
+
EnforcedStyle: exploded
|
351
|
+
SupportedStyles:
|
352
|
+
- compact
|
353
|
+
- exploded
|
354
|
+
|
355
|
+
Style/RedundantReturn:
|
356
|
+
AllowMultipleReturnValues: false
|
357
|
+
|
358
|
+
Style/RegexpLiteral:
|
359
|
+
EnforcedStyle: mixed
|
360
|
+
SupportedStyles:
|
361
|
+
- slashes
|
362
|
+
- percent_r
|
363
|
+
- mixed
|
364
|
+
AllowInnerSlashes: false
|
365
|
+
|
366
|
+
Style/SafeNavigation:
|
367
|
+
ConvertCodeThatCanStartToReturnNil: false
|
368
|
+
Enabled: true
|
369
|
+
|
370
|
+
Lint/SafeNavigationChain:
|
371
|
+
Enabled: true
|
372
|
+
|
373
|
+
Style/Semicolon:
|
374
|
+
AllowAsExpressionSeparator: false
|
375
|
+
|
376
|
+
Style/SignalException:
|
377
|
+
EnforcedStyle: only_raise
|
378
|
+
SupportedStyles:
|
379
|
+
- only_raise
|
380
|
+
- only_fail
|
381
|
+
- semantic
|
382
|
+
|
383
|
+
Style/SingleLineMethods:
|
384
|
+
AllowIfMethodIsEmpty: true
|
385
|
+
|
386
|
+
Layout/SpaceBeforeFirstArg:
|
387
|
+
AllowForAlignment: true
|
388
|
+
|
389
|
+
Style/SpecialGlobalVars:
|
390
|
+
EnforcedStyle: use_english_names
|
391
|
+
SupportedStyles:
|
392
|
+
- use_perl_names
|
393
|
+
- use_english_names
|
394
|
+
|
395
|
+
Style/StabbyLambdaParentheses:
|
396
|
+
EnforcedStyle: require_parentheses
|
397
|
+
SupportedStyles:
|
398
|
+
- require_parentheses
|
399
|
+
- require_no_parentheses
|
400
|
+
|
401
|
+
Style/StringLiteralsInInterpolation:
|
402
|
+
EnforcedStyle: single_quotes
|
403
|
+
SupportedStyles:
|
404
|
+
- single_quotes
|
405
|
+
- double_quotes
|
406
|
+
|
407
|
+
Layout/SpaceAroundBlockParameters:
|
408
|
+
EnforcedStyleInsidePipes: no_space
|
409
|
+
SupportedStylesInsidePipes:
|
410
|
+
- space
|
411
|
+
- no_space
|
412
|
+
|
413
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
414
|
+
EnforcedStyle: space
|
415
|
+
SupportedStyles:
|
416
|
+
- space
|
417
|
+
- no_space
|
418
|
+
|
419
|
+
Layout/SpaceAroundOperators:
|
420
|
+
AllowForAlignment: true
|
421
|
+
|
422
|
+
Layout/SpaceBeforeBlockBraces:
|
423
|
+
EnforcedStyle: space
|
424
|
+
EnforcedStyleForEmptyBraces: space
|
425
|
+
SupportedStyles:
|
426
|
+
- space
|
427
|
+
- no_space
|
428
|
+
|
429
|
+
Layout/SpaceInsideBlockBraces:
|
430
|
+
EnforcedStyle: space
|
431
|
+
SupportedStyles:
|
432
|
+
- space
|
433
|
+
- no_space
|
434
|
+
EnforcedStyleForEmptyBraces: no_space
|
435
|
+
SpaceBeforeBlockParameters: true
|
436
|
+
|
437
|
+
Layout/SpaceInsideHashLiteralBraces:
|
438
|
+
EnforcedStyle: space
|
439
|
+
EnforcedStyleForEmptyBraces: no_space
|
440
|
+
SupportedStyles:
|
441
|
+
- space
|
442
|
+
- no_space
|
443
|
+
- compact
|
444
|
+
|
445
|
+
Layout/SpaceInsideStringInterpolation:
|
446
|
+
EnforcedStyle: no_space
|
447
|
+
SupportedStyles:
|
448
|
+
- space
|
449
|
+
- no_space
|
450
|
+
|
451
|
+
Style/SymbolProc:
|
452
|
+
IgnoredMethods:
|
453
|
+
- respond_to
|
454
|
+
- define_method
|
455
|
+
|
456
|
+
Style/TernaryParentheses:
|
457
|
+
EnforcedStyle: require_no_parentheses
|
458
|
+
SupportedStyles:
|
459
|
+
- require_parentheses
|
460
|
+
- require_no_parentheses
|
461
|
+
AllowSafeAssignment: true
|
462
|
+
|
463
|
+
Layout/TrailingEmptyLines:
|
464
|
+
EnforcedStyle: final_newline
|
465
|
+
SupportedStyles:
|
466
|
+
- final_newline
|
467
|
+
- final_blank_line
|
468
|
+
|
469
|
+
Style/TrivialAccessors:
|
470
|
+
ExactNameMatch: true
|
471
|
+
AllowPredicates: true
|
472
|
+
AllowDSLWriters: false
|
473
|
+
IgnoreClassMethods: false
|
474
|
+
AllowedMethods:
|
475
|
+
- to_ary
|
476
|
+
- to_a
|
477
|
+
- to_c
|
478
|
+
- to_enum
|
479
|
+
- to_h
|
480
|
+
- to_hash
|
481
|
+
- to_i
|
482
|
+
- to_int
|
483
|
+
- to_io
|
484
|
+
- to_open
|
485
|
+
- to_path
|
486
|
+
- to_proc
|
487
|
+
- to_r
|
488
|
+
- to_regexp
|
489
|
+
- to_str
|
490
|
+
- to_s
|
491
|
+
- to_sym
|
492
|
+
|
493
|
+
Naming/VariableName:
|
494
|
+
EnforcedStyle: snake_case
|
495
|
+
SupportedStyles:
|
496
|
+
- snake_case
|
497
|
+
- camelCase
|
498
|
+
|
499
|
+
Style/WhileUntilModifier:
|
500
|
+
Enabled: true
|
501
|
+
|
502
|
+
Metrics/BlockNesting:
|
503
|
+
Max: 3
|
504
|
+
|
505
|
+
Layout/LineLength:
|
506
|
+
Max: 120
|
507
|
+
AllowHeredoc: true
|
508
|
+
AllowURI: true
|
509
|
+
URISchemes:
|
510
|
+
- http
|
511
|
+
- https
|
512
|
+
IgnoreCopDirectives: false
|
513
|
+
IgnoredPatterns:
|
514
|
+
- '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
|
515
|
+
|
516
|
+
Metrics/ParameterLists:
|
517
|
+
Max: 5
|
518
|
+
CountKeywordArgs: false
|
519
|
+
|
520
|
+
Layout/BlockAlignment:
|
521
|
+
EnforcedStyleAlignWith: either
|
522
|
+
SupportedStylesAlignWith:
|
523
|
+
- either
|
524
|
+
- start_of_block
|
525
|
+
- start_of_line
|
526
|
+
|
527
|
+
Layout/EndAlignment:
|
528
|
+
EnforcedStyleAlignWith: variable
|
529
|
+
SupportedStylesAlignWith:
|
530
|
+
- keyword
|
531
|
+
- variable
|
532
|
+
- start_of_line
|
533
|
+
|
534
|
+
Layout/DefEndAlignment:
|
535
|
+
EnforcedStyleAlignWith: start_of_line
|
536
|
+
SupportedStylesAlignWith:
|
537
|
+
- start_of_line
|
538
|
+
- def
|
539
|
+
|
540
|
+
Lint/InheritException:
|
541
|
+
EnforcedStyle: runtime_error
|
542
|
+
SupportedStyles:
|
543
|
+
- runtime_error
|
544
|
+
- standard_error
|
545
|
+
|
546
|
+
Lint/UnusedBlockArgument:
|
547
|
+
IgnoreEmptyBlocks: true
|
548
|
+
AllowUnusedKeywordArguments: false
|
549
|
+
|
550
|
+
Lint/UnusedMethodArgument:
|
551
|
+
AllowUnusedKeywordArguments: false
|
552
|
+
IgnoreEmptyMethods: true
|
553
|
+
|
554
|
+
Naming/AccessorMethodName:
|
555
|
+
Enabled: true
|
556
|
+
|
557
|
+
Layout/ArrayAlignment:
|
558
|
+
Enabled: true
|
559
|
+
|
560
|
+
Style/ArrayJoin:
|
561
|
+
Enabled: true
|
562
|
+
|
563
|
+
Naming/AsciiIdentifiers:
|
564
|
+
Enabled: true
|
565
|
+
|
566
|
+
Style/Attr:
|
567
|
+
Enabled: true
|
568
|
+
|
569
|
+
Style/BeginBlock:
|
570
|
+
Enabled: true
|
571
|
+
|
572
|
+
Style/BlockComments:
|
573
|
+
Enabled: true
|
574
|
+
|
575
|
+
Layout/BlockEndNewline:
|
576
|
+
Enabled: true
|
577
|
+
|
578
|
+
Style/CaseEquality:
|
579
|
+
Enabled: true
|
580
|
+
|
581
|
+
Style/CharacterLiteral:
|
582
|
+
Enabled: true
|
583
|
+
|
584
|
+
Naming/ClassAndModuleCamelCase:
|
585
|
+
Enabled: true
|
586
|
+
|
587
|
+
Style/ClassMethods:
|
588
|
+
Enabled: true
|
589
|
+
|
590
|
+
Style/ClassVars:
|
591
|
+
Enabled: true
|
592
|
+
|
593
|
+
Layout/ClosingParenthesisIndentation:
|
594
|
+
Enabled: true
|
595
|
+
|
596
|
+
Style/ColonMethodCall:
|
597
|
+
Enabled: true
|
598
|
+
|
599
|
+
Layout/CommentIndentation:
|
600
|
+
Enabled: true
|
601
|
+
|
602
|
+
Naming/ConstantName:
|
603
|
+
Enabled: true
|
604
|
+
|
605
|
+
Style/DateTime:
|
606
|
+
Enabled: true
|
607
|
+
|
608
|
+
Style/DefWithParentheses:
|
609
|
+
Enabled: true
|
610
|
+
|
611
|
+
Style/EachForSimpleLoop:
|
612
|
+
Enabled: true
|
613
|
+
|
614
|
+
Style/EachWithObject:
|
615
|
+
Enabled: true
|
616
|
+
|
617
|
+
Layout/ElseAlignment:
|
618
|
+
Enabled: true
|
619
|
+
|
620
|
+
Style/EmptyCaseCondition:
|
621
|
+
Enabled: true
|
622
|
+
|
623
|
+
Layout/EmptyLines:
|
624
|
+
Enabled: true
|
625
|
+
|
626
|
+
Layout/EmptyLinesAroundAccessModifier:
|
627
|
+
Enabled: true
|
628
|
+
|
629
|
+
Layout/EmptyLinesAroundMethodBody:
|
630
|
+
Enabled: true
|
631
|
+
|
632
|
+
Style/EmptyLiteral:
|
633
|
+
Enabled: true
|
634
|
+
|
635
|
+
Style/EndBlock:
|
636
|
+
Enabled: true
|
637
|
+
|
638
|
+
Layout/EndOfLine:
|
639
|
+
Enabled: true
|
640
|
+
|
641
|
+
Style/EvenOdd:
|
642
|
+
Enabled: true
|
643
|
+
|
644
|
+
Layout/InitialIndentation:
|
645
|
+
Enabled: true
|
646
|
+
|
647
|
+
Lint/FlipFlop:
|
648
|
+
Enabled: true
|
649
|
+
|
650
|
+
Style/IfInsideElse:
|
651
|
+
Enabled: true
|
652
|
+
|
653
|
+
Style/IfUnlessModifierOfIfUnless:
|
654
|
+
Enabled: true
|
655
|
+
|
656
|
+
Style/IfWithSemicolon:
|
657
|
+
Enabled: true
|
658
|
+
|
659
|
+
Style/IdenticalConditionalBranches:
|
660
|
+
Enabled: true
|
661
|
+
|
662
|
+
Style/InfiniteLoop:
|
663
|
+
Enabled: true
|
664
|
+
|
665
|
+
Layout/LeadingCommentSpace:
|
666
|
+
Enabled: true
|
667
|
+
|
668
|
+
Style/LineEndConcatenation:
|
669
|
+
Enabled: true
|
670
|
+
|
671
|
+
Style/MethodCallWithoutArgsParentheses:
|
672
|
+
Enabled: true
|
673
|
+
|
674
|
+
Style/MethodMissingSuper:
|
675
|
+
Enabled: true
|
676
|
+
|
677
|
+
Style/MissingRespondToMissing:
|
678
|
+
Enabled: true
|
679
|
+
|
680
|
+
Layout/MultilineBlockLayout:
|
681
|
+
Enabled: true
|
682
|
+
|
683
|
+
Style/MultilineIfThen:
|
684
|
+
Enabled: true
|
685
|
+
|
686
|
+
Style/MultilineMemoization:
|
687
|
+
Enabled: true
|
688
|
+
|
689
|
+
Style/MultilineTernaryOperator:
|
690
|
+
Enabled: true
|
691
|
+
|
692
|
+
Style/NegatedIf:
|
693
|
+
Enabled: true
|
694
|
+
|
695
|
+
Style/NegatedWhile:
|
696
|
+
Enabled: true
|
697
|
+
|
698
|
+
Style/NestedModifier:
|
699
|
+
Enabled: true
|
700
|
+
|
701
|
+
Style/NestedParenthesizedCalls:
|
702
|
+
Enabled: true
|
703
|
+
|
704
|
+
Style/NestedTernaryOperator:
|
705
|
+
Enabled: true
|
706
|
+
|
707
|
+
Style/NilComparison:
|
708
|
+
Enabled: true
|
709
|
+
|
710
|
+
Style/Not:
|
711
|
+
Enabled: true
|
712
|
+
|
713
|
+
Style/OneLineConditional:
|
714
|
+
Enabled: true
|
715
|
+
|
716
|
+
Naming/BinaryOperatorParameterName:
|
717
|
+
Enabled: true
|
718
|
+
|
719
|
+
Style/OptionalArguments:
|
720
|
+
Enabled: true
|
721
|
+
|
722
|
+
Style/ParallelAssignment:
|
723
|
+
Enabled: true
|
724
|
+
|
725
|
+
Style/PerlBackrefs:
|
726
|
+
Enabled: true
|
727
|
+
|
728
|
+
Style/Proc:
|
729
|
+
Enabled: true
|
730
|
+
|
731
|
+
Style/RedundantBegin:
|
732
|
+
Enabled: true
|
733
|
+
|
734
|
+
Style/RedundantException:
|
735
|
+
Enabled: true
|
736
|
+
|
737
|
+
Style/RedundantFreeze:
|
738
|
+
Enabled: true
|
739
|
+
|
740
|
+
Style/RedundantParentheses:
|
741
|
+
Enabled: true
|
742
|
+
|
743
|
+
Style/RedundantSelf:
|
744
|
+
Enabled: true
|
745
|
+
|
746
|
+
Style/RedundantSortBy:
|
747
|
+
Enabled: true
|
748
|
+
|
749
|
+
Layout/RescueEnsureAlignment:
|
750
|
+
Enabled: true
|
751
|
+
|
752
|
+
Style/RescueModifier:
|
753
|
+
Enabled: true
|
754
|
+
|
755
|
+
Style/Sample:
|
756
|
+
Enabled: true
|
757
|
+
|
758
|
+
Style/SelfAssignment:
|
759
|
+
Enabled: true
|
760
|
+
|
761
|
+
Layout/SpaceAfterColon:
|
762
|
+
Enabled: true
|
763
|
+
|
764
|
+
Layout/SpaceAfterComma:
|
765
|
+
Enabled: true
|
766
|
+
|
767
|
+
Layout/SpaceAfterMethodName:
|
768
|
+
Enabled: true
|
769
|
+
|
770
|
+
Layout/SpaceAfterNot:
|
771
|
+
Enabled: true
|
772
|
+
|
773
|
+
Layout/SpaceAfterSemicolon:
|
774
|
+
Enabled: true
|
775
|
+
|
776
|
+
Layout/SpaceBeforeComma:
|
777
|
+
Enabled: true
|
778
|
+
|
779
|
+
Layout/SpaceBeforeComment:
|
780
|
+
Enabled: true
|
781
|
+
|
782
|
+
Layout/SpaceBeforeSemicolon:
|
783
|
+
Enabled: true
|
784
|
+
|
785
|
+
Layout/SpaceAroundKeyword:
|
786
|
+
Enabled: true
|
787
|
+
|
788
|
+
Layout/SpaceInsideArrayPercentLiteral:
|
789
|
+
Enabled: true
|
790
|
+
|
791
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
792
|
+
Enabled: true
|
793
|
+
|
794
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
795
|
+
Enabled: true
|
796
|
+
|
797
|
+
Layout/SpaceInsideParens:
|
798
|
+
Enabled: true
|
799
|
+
|
800
|
+
Layout/SpaceInsideRangeLiteral:
|
801
|
+
Enabled: true
|
802
|
+
|
803
|
+
Style/SymbolLiteral:
|
804
|
+
Enabled: true
|
805
|
+
|
806
|
+
Layout/Tab:
|
807
|
+
Enabled: true
|
808
|
+
|
809
|
+
Layout/TrailingWhitespace:
|
810
|
+
Enabled: true
|
811
|
+
|
812
|
+
Style/UnlessElse:
|
813
|
+
Enabled: true
|
814
|
+
|
815
|
+
Style/RedundantCapitalW:
|
816
|
+
Enabled: true
|
817
|
+
|
818
|
+
Style/RedundantInterpolation:
|
819
|
+
Enabled: true
|
820
|
+
|
821
|
+
Style/RedundantPercentQ:
|
822
|
+
Enabled: true
|
823
|
+
|
824
|
+
Style/VariableInterpolation:
|
825
|
+
Enabled: true
|
826
|
+
|
827
|
+
Style/WhenThen:
|
828
|
+
Enabled: true
|
829
|
+
|
830
|
+
Style/WhileUntilDo:
|
831
|
+
Enabled: true
|
832
|
+
|
833
|
+
Style/ZeroLengthPredicate:
|
834
|
+
Enabled: true
|
835
|
+
|
836
|
+
Layout/HeredocIndentation:
|
837
|
+
EnforcedStyle: squiggly
|
838
|
+
|
839
|
+
Lint/AmbiguousOperator:
|
840
|
+
Enabled: true
|
841
|
+
|
842
|
+
Lint/AmbiguousRegexpLiteral:
|
843
|
+
Enabled: true
|
844
|
+
|
845
|
+
Lint/CircularArgumentReference:
|
846
|
+
Enabled: true
|
847
|
+
|
848
|
+
Layout/ConditionPosition:
|
849
|
+
Enabled: true
|
850
|
+
|
851
|
+
Lint/Debugger:
|
852
|
+
Enabled: true
|
853
|
+
|
854
|
+
Lint/DeprecatedClassMethods:
|
855
|
+
Enabled: true
|
856
|
+
|
857
|
+
Lint/DuplicateMethods:
|
858
|
+
Enabled: true
|
859
|
+
|
860
|
+
Lint/DuplicateHashKey:
|
861
|
+
Enabled: true
|
862
|
+
|
863
|
+
Lint/EachWithObjectArgument:
|
864
|
+
Enabled: true
|
865
|
+
|
866
|
+
Lint/ElseLayout:
|
867
|
+
Enabled: true
|
868
|
+
|
869
|
+
Lint/EmptyEnsure:
|
870
|
+
Enabled: true
|
871
|
+
|
872
|
+
Lint/EmptyInterpolation:
|
873
|
+
Enabled: true
|
874
|
+
|
875
|
+
Lint/EndInMethod:
|
876
|
+
Enabled: true
|
877
|
+
|
878
|
+
Lint/EnsureReturn:
|
879
|
+
Enabled: true
|
880
|
+
|
881
|
+
Lint/FloatOutOfRange:
|
882
|
+
Enabled: true
|
883
|
+
|
884
|
+
Lint/FormatParameterMismatch:
|
885
|
+
Enabled: true
|
886
|
+
|
887
|
+
Lint/SuppressedException:
|
888
|
+
AllowComments: true
|
889
|
+
|
890
|
+
Lint/ImplicitStringConcatenation:
|
891
|
+
Description: Checks for adjacent string literals on the same line, which could
|
892
|
+
better be represented as a single string literal.
|
893
|
+
|
894
|
+
Lint/IneffectiveAccessModifier:
|
895
|
+
Description: Checks for attempts to use `private` or `protected` to set the visibility
|
896
|
+
of a class method, which does not work.
|
897
|
+
|
898
|
+
Lint/LiteralAsCondition:
|
899
|
+
Enabled: true
|
900
|
+
|
901
|
+
Lint/LiteralInInterpolation:
|
902
|
+
Enabled: true
|
903
|
+
|
904
|
+
Lint/Loop:
|
905
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
906
|
+
for post-loop tests.
|
907
|
+
|
908
|
+
Lint/NestedMethodDefinition:
|
909
|
+
Enabled: true
|
910
|
+
|
911
|
+
Lint/NextWithoutAccumulator:
|
912
|
+
Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
|
913
|
+
block.
|
914
|
+
|
915
|
+
Lint/NonLocalExitFromIterator:
|
916
|
+
Enabled: true
|
917
|
+
|
918
|
+
Lint/ParenthesesAsGroupedExpression:
|
919
|
+
Enabled: true
|
920
|
+
|
921
|
+
Lint/PercentStringArray:
|
922
|
+
Enabled: true
|
923
|
+
|
924
|
+
Lint/PercentSymbolArray:
|
925
|
+
Enabled: true
|
926
|
+
|
927
|
+
Lint/RandOne:
|
928
|
+
Description: Checks for `rand(1)` calls. Such calls always return `0` and most
|
929
|
+
likely a mistake.
|
930
|
+
|
931
|
+
Lint/RequireParentheses:
|
932
|
+
Enabled: true
|
933
|
+
|
934
|
+
Lint/RescueException:
|
935
|
+
Enabled: true
|
936
|
+
|
937
|
+
Lint/ShadowedException:
|
938
|
+
Enabled: true
|
939
|
+
|
940
|
+
Lint/ShadowingOuterLocalVariable:
|
941
|
+
Enabled: true
|
942
|
+
|
943
|
+
Lint/RedundantStringCoercion:
|
944
|
+
Enabled: true
|
945
|
+
|
946
|
+
Lint/UnderscorePrefixedVariableName:
|
947
|
+
Enabled: true
|
948
|
+
|
949
|
+
Lint/UnifiedInteger:
|
950
|
+
Enabled: true
|
951
|
+
|
952
|
+
Lint/RedundantCopDisableDirective:
|
953
|
+
Enabled: true
|
954
|
+
|
955
|
+
Lint/RedundantCopEnableDirective:
|
956
|
+
Enabled: true
|
957
|
+
|
958
|
+
Lint/RedundantSplatExpansion:
|
959
|
+
Enabled: true
|
960
|
+
|
961
|
+
Lint/UnreachableCode:
|
962
|
+
Enabled: true
|
963
|
+
|
964
|
+
Lint/UselessAccessModifier:
|
965
|
+
ContextCreatingMethods: []
|
966
|
+
|
967
|
+
Lint/UselessAssignment:
|
968
|
+
Enabled: true
|
969
|
+
|
970
|
+
Lint/UselessComparison:
|
971
|
+
Enabled: true
|
972
|
+
|
973
|
+
Lint/UselessElseWithoutRescue:
|
974
|
+
Enabled: true
|
975
|
+
|
976
|
+
Lint/UselessSetterCall:
|
977
|
+
Enabled: true
|
978
|
+
|
979
|
+
Lint/Void:
|
980
|
+
Enabled: true
|
981
|
+
|
982
|
+
Security/Eval:
|
983
|
+
Enabled: true
|
984
|
+
|
985
|
+
Security/JSONLoad:
|
986
|
+
Enabled: true
|
987
|
+
|
988
|
+
Security/Open:
|
989
|
+
Enabled: true
|
990
|
+
|
991
|
+
Lint/BigDecimalNew:
|
992
|
+
Enabled: true
|
993
|
+
|
994
|
+
Style/Strip:
|
995
|
+
Enabled: true
|
996
|
+
|
997
|
+
Style/TrailingBodyOnClass:
|
998
|
+
Enabled: true
|
999
|
+
|
1000
|
+
Style/TrailingBodyOnModule:
|
1001
|
+
Enabled: true
|
1002
|
+
|
1003
|
+
Style/TrailingCommaInArrayLiteral:
|
1004
|
+
EnforcedStyleForMultiline: comma
|
1005
|
+
Enabled: true
|
1006
|
+
|
1007
|
+
Style/TrailingCommaInHashLiteral:
|
1008
|
+
EnforcedStyleForMultiline: comma
|
1009
|
+
Enabled: true
|
1010
|
+
|
1011
|
+
Layout/SpaceInsideReferenceBrackets:
|
1012
|
+
EnforcedStyle: no_space
|
1013
|
+
EnforcedStyleForEmptyBrackets: no_space
|
1014
|
+
Enabled: true
|
1015
|
+
|
1016
|
+
Style/ModuleFunction:
|
1017
|
+
EnforcedStyle: extend_self
|
1018
|
+
|
1019
|
+
Lint/OrderedMagicComments:
|
1020
|
+
Enabled: true
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-shopify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shopify Engineering
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.78.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.78.0
|
27
|
+
description: Gem containing the rubocop.yml config that corresponds to the implementation
|
28
|
+
of the Shopify's style guide for Ruby.
|
29
|
+
email: gems@shopify.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- rubocop-cli.yml
|
35
|
+
- rubocop.yml
|
36
|
+
homepage: https://shopify.github.io/ruby-style-guide/
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata:
|
40
|
+
source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v1.0.0
|
41
|
+
post_install_message:
|
42
|
+
rdoc_options: []
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubygems_version: 3.0.3
|
57
|
+
signing_key:
|
58
|
+
specification_version: 4
|
59
|
+
summary: Shopify's style guide for Ruby.
|
60
|
+
test_files: []
|