much-style-guide 0.1.0

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