google-style 1.26.2 → 1.27.0
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/google-style.yml +139 -1
- data/lib/google/style/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a49ab0c0da9f69e6d6ddd9c41f6b3c68e38c1cbca9e6779afc3c7e9e076788
|
4
|
+
data.tar.gz: 8696d4e76014ab0319a17570fad4d3bf39b4cc93e71e1dde5d9e5f57b70be2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d16ac0ac6c7603dacfc3c215e2234f2811cc09ae05b2cad5339549ed284f06ce806c2ec620e385fdb9cbdd08131775079462a7405f8ddef180af8cfe5e63118
|
7
|
+
data.tar.gz: 0e84cc6d4f5fa48cea843efd4568b2dc8e6743447c1887aa905d60293d7ed51cdc7611d519583bea98639f6adb73424f7ea52f843d8b7a2ec98fafe05267989b
|
data/google-style.yml
CHANGED
@@ -15,12 +15,16 @@
|
|
15
15
|
AllCops:
|
16
16
|
NewCops: disable
|
17
17
|
SuggestExtensions: false
|
18
|
-
TargetRubyVersion: 2.
|
18
|
+
TargetRubyVersion: 2.7
|
19
19
|
|
20
20
|
# Added in Rubocop 1.30
|
21
21
|
Gemspec/DeprecatedAttributeAssignment:
|
22
22
|
Enabled: true
|
23
23
|
|
24
|
+
# Added in Rubocop 1.44
|
25
|
+
Gemspec/DevelopmentDependencies:
|
26
|
+
Enabled: true
|
27
|
+
|
24
28
|
# Disabled for now.
|
25
29
|
Gemspec/RequireMFA:
|
26
30
|
Enabled: false
|
@@ -74,6 +78,12 @@ Lint/AmbiguousRange:
|
|
74
78
|
Lint/ConstantOverwrittenInRescue:
|
75
79
|
Enabled: true
|
76
80
|
|
81
|
+
# Samples often use Kernel#p which Lint/Debugger doesn't like.
|
82
|
+
Lint/Debugger:
|
83
|
+
Exclude:
|
84
|
+
- "samples/**/*.rb"
|
85
|
+
- "snippets/**/*.rb"
|
86
|
+
|
77
87
|
# Added in Rubocop 1.8
|
78
88
|
Lint/DeprecatedConstants:
|
79
89
|
Enabled: true
|
@@ -82,6 +92,14 @@ Lint/DeprecatedConstants:
|
|
82
92
|
Lint/DuplicateBranch:
|
83
93
|
Enabled: true
|
84
94
|
|
95
|
+
# Added in Rubocop 1.37
|
96
|
+
Lint/DuplicateMagicComment:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Added in Rubocop 1.50
|
100
|
+
Lint/DuplicateMatchPattern:
|
101
|
+
Enabled: true
|
102
|
+
|
85
103
|
# Added in Rubocop 1.1
|
86
104
|
Lint/DuplicateRegexpCharacterClassElement:
|
87
105
|
Enabled: true
|
@@ -106,6 +124,10 @@ Lint/IncompatibleIoSelectWithFiberScheduler:
|
|
106
124
|
Lint/LambdaWithoutLiteralBlock:
|
107
125
|
Enabled: true
|
108
126
|
|
127
|
+
# Added in Rubocop 1.53
|
128
|
+
Lint/MixedCaseRange:
|
129
|
+
Enabled: true
|
130
|
+
|
109
131
|
# Added in Rubocop 1.2
|
110
132
|
Lint/NoReturnInBeginEndBlocks:
|
111
133
|
Enabled: true
|
@@ -126,10 +148,18 @@ Lint/OrAssignmentToConstant:
|
|
126
148
|
Lint/RedundantDirGlobSort:
|
127
149
|
Enabled: true
|
128
150
|
|
151
|
+
# Added in Rubocop 1.53
|
152
|
+
Lint/RedundantRegexpQuantifiers:
|
153
|
+
Enabled: true
|
154
|
+
|
129
155
|
# Added in Rubocop 1.27
|
130
156
|
Lint/RefinementImportMethods:
|
131
157
|
Enabled: true
|
132
158
|
|
159
|
+
# Added in Rubocop 1.32
|
160
|
+
Lint/RequireRangeParentheses:
|
161
|
+
Enabled: true
|
162
|
+
|
133
163
|
# Added in Rubocop 1.22
|
134
164
|
Lint/RequireRelativeSelfPath:
|
135
165
|
Enabled: true
|
@@ -154,6 +184,10 @@ Lint/UnexpectedBlockArity:
|
|
154
184
|
Lint/UnmodifiedReduceAccumulator:
|
155
185
|
Enabled: true
|
156
186
|
|
187
|
+
# Added in Rubocop 1.43
|
188
|
+
Lint/UselessRescue:
|
189
|
+
Enabled: true
|
190
|
+
|
157
191
|
# Added in Rubocop 1.23
|
158
192
|
Lint/UselessRuby2Keywords:
|
159
193
|
Enabled: true
|
@@ -161,6 +195,10 @@ Lint/UselessRuby2Keywords:
|
|
161
195
|
Metrics/AbcSize:
|
162
196
|
Max: 30
|
163
197
|
|
198
|
+
# Could be problematic for generated code, and overall not very useful.
|
199
|
+
Metrics/CollectionLiteralLength:
|
200
|
+
Enabled: false
|
201
|
+
|
164
202
|
Metrics/CyclomaticComplexity:
|
165
203
|
Max: 10
|
166
204
|
|
@@ -218,10 +256,26 @@ Style/CaseEquality:
|
|
218
256
|
Style/CollectionCompact:
|
219
257
|
Enabled: true
|
220
258
|
|
259
|
+
# Added in Rubocop 1.44
|
260
|
+
Style/ComparableClamp:
|
261
|
+
Enabled: true
|
262
|
+
|
263
|
+
# Added in Rubocop 1.41
|
264
|
+
Style/ConcatArrayLiterals:
|
265
|
+
Enabled: true
|
266
|
+
|
267
|
+
# Added in Rubocop 1.48
|
268
|
+
Style/DirEmpty:
|
269
|
+
Enabled: true
|
270
|
+
|
221
271
|
# Added in Rubocop 1.1
|
222
272
|
Style/DocumentDynamicEvalDefinition:
|
223
273
|
Enabled: true
|
224
274
|
|
275
|
+
# Added in Rubocop 1.32
|
276
|
+
Style/EmptyHeredoc:
|
277
|
+
Enabled: true
|
278
|
+
|
225
279
|
# We prefer consistent method indentation.
|
226
280
|
Style/EmptyMethod:
|
227
281
|
EnforcedStyle: expanded
|
@@ -234,10 +288,18 @@ Style/EndlessMethod:
|
|
234
288
|
Style/EnvHome:
|
235
289
|
Enabled: true
|
236
290
|
|
291
|
+
# Added in Rubocop 1.51
|
292
|
+
Style/ExactRegexpMatch:
|
293
|
+
Enabled: true
|
294
|
+
|
237
295
|
# This check is overly paranoid.
|
238
296
|
Style/FetchEnvVar:
|
239
297
|
Enabled: false
|
240
298
|
|
299
|
+
# Added in Rubocop 1.48
|
300
|
+
Style/FileEmpty:
|
301
|
+
Enabled: true
|
302
|
+
|
241
303
|
# Added in Rubocop 1.24
|
242
304
|
Style/FileRead:
|
243
305
|
Enabled: true
|
@@ -271,6 +333,10 @@ Style/IfWithBooleanLiteralBranches:
|
|
271
333
|
Style/InPatternThen:
|
272
334
|
Enabled: true
|
273
335
|
|
336
|
+
# Added in Rubocop 1.35
|
337
|
+
Style/MagicCommentFormat:
|
338
|
+
Enabled: true
|
339
|
+
|
274
340
|
# Added in Rubocop 1.30
|
275
341
|
Style/MapCompactWithConditionalBlock:
|
276
342
|
Enabled: true
|
@@ -279,6 +345,10 @@ Style/MapCompactWithConditionalBlock:
|
|
279
345
|
Style/MapToHash:
|
280
346
|
Enabled: true
|
281
347
|
|
348
|
+
# Added in Rubocop 1.42
|
349
|
+
Style/MapToSet:
|
350
|
+
Enabled: true
|
351
|
+
|
282
352
|
# We adopt Seattle-style paren usage
|
283
353
|
Style/MethodCallWithArgsParentheses:
|
284
354
|
AllowParenthesesInCamelCaseMethod: true
|
@@ -291,6 +361,11 @@ Style/MethodCallWithArgsParentheses:
|
|
291
361
|
Style/MethodDefParentheses:
|
292
362
|
EnforcedStyle: require_no_parentheses
|
293
363
|
|
364
|
+
# I (dazuma@) am not a fan of this rule. It's a bit more readable but at the
|
365
|
+
# cost of being logically clever.
|
366
|
+
Style/MinMaxComparison:
|
367
|
+
Enabled: false
|
368
|
+
|
294
369
|
# Enable use of the different semantics of module_function and extend self.
|
295
370
|
Style/ModuleFunction:
|
296
371
|
Enabled: false
|
@@ -299,6 +374,11 @@ Style/ModuleFunction:
|
|
299
374
|
Style/MultilineInPatternThen:
|
300
375
|
Enabled: true
|
301
376
|
|
377
|
+
# I (dazuma@) am not a fan of this rule. Its readability benefit is debatable
|
378
|
+
# and it carries the cost of being logically clever.
|
379
|
+
Style/MultipleComparison:
|
380
|
+
Enabled: false
|
381
|
+
|
302
382
|
# Added in Rubocop 1.2
|
303
383
|
Style/NegatedIfElseCondition:
|
304
384
|
Enabled: true
|
@@ -332,6 +412,11 @@ Style/OpenStructUse:
|
|
332
412
|
- "acceptance/**/*.rb"
|
333
413
|
- "samples/acceptance/**/*.rb"
|
334
414
|
|
415
|
+
# Added in Rubocop 1.37. Open to disabling this if it causes problems for
|
416
|
+
# metaprogramming-heavy code.
|
417
|
+
Style/OperatorMethodCall:
|
418
|
+
Enabled: true
|
419
|
+
|
335
420
|
# Added in Rubocop 1.16
|
336
421
|
Style/QuotedSymbols:
|
337
422
|
Enabled: true
|
@@ -340,19 +425,64 @@ Style/QuotedSymbols:
|
|
340
425
|
Style/RedundantArgument:
|
341
426
|
Enabled: true
|
342
427
|
|
428
|
+
# Added in Rubocop 1.52
|
429
|
+
Style/RedundantArrayConstructor:
|
430
|
+
Enabled: true
|
431
|
+
|
343
432
|
# Disabled because we prefer to keep begin-end blocks in memoization for
|
344
433
|
# readability (see https://github.com/rubocop/rubocop/pull/9602).
|
345
434
|
Style/RedundantBegin:
|
346
435
|
Enabled: false
|
347
436
|
|
437
|
+
# Disabled because we believe it's good practice to be explicit about constant
|
438
|
+
# namespaces, given how confusing constant lookup rules are in Ruby.
|
439
|
+
Style/RedundantConstantBase:
|
440
|
+
Enabled: false
|
441
|
+
|
442
|
+
# Added in Rubocop 1.53
|
443
|
+
Style/RedundantCurrentDirectoryInPath:
|
444
|
+
Enabled: true
|
445
|
+
|
446
|
+
# Added in Rubocop 1.41
|
447
|
+
Style/RedundantDoubleSplatHashBraces:
|
448
|
+
Enabled: true
|
449
|
+
|
450
|
+
# Added in Rubocop 1.38
|
451
|
+
Style/RedundantEach:
|
452
|
+
Enabled: true
|
453
|
+
|
454
|
+
# Added in Rubocop 1.52
|
455
|
+
Style/RedundantFilterChain:
|
456
|
+
Enabled: true
|
457
|
+
|
458
|
+
# Added in Rubocop 1.45
|
459
|
+
Style/RedundantHeredocDelimiterQuotes:
|
460
|
+
Enabled: true
|
461
|
+
|
348
462
|
# Added in Rubocop 1.27
|
349
463
|
Style/RedundantInitialize:
|
350
464
|
Enabled: true
|
351
465
|
|
466
|
+
# Added in Rubocop 1.49
|
467
|
+
Style/RedundantLineContinuation:
|
468
|
+
Enabled: true
|
469
|
+
|
470
|
+
# Added in Rubocop 1.53
|
471
|
+
Style/RedundantRegexpArgument:
|
472
|
+
Enabled: true
|
473
|
+
|
474
|
+
# Added in Rubocop 1.52
|
475
|
+
Style/RedundantRegexpConstructor:
|
476
|
+
Enabled: true
|
477
|
+
|
352
478
|
# Added in Rubocop 1.19
|
353
479
|
Style/RedundantSelfAssignmentBranch:
|
354
480
|
Enabled: true
|
355
481
|
|
482
|
+
# Added in Rubocop 1.37
|
483
|
+
Style/RedundantStringEscape:
|
484
|
+
Enabled: true
|
485
|
+
|
356
486
|
# Disabled because we find it to be pedantic. The enforced rules are too simple
|
357
487
|
# to capture readability, and are especially problematic for generated code.
|
358
488
|
Style/RegexpLiteral:
|
@@ -362,6 +492,10 @@ Style/RegexpLiteral:
|
|
362
492
|
Style/RescueModifier:
|
363
493
|
Enabled: false
|
364
494
|
|
495
|
+
# Added in Rubocop 1.53. Open to disabling, since there may be exceptions.
|
496
|
+
Style/ReturnNilInPredicateMethodDefinition:
|
497
|
+
Enabled: true
|
498
|
+
|
365
499
|
# We disagree with this one. Grep is more specialized than select/reject.
|
366
500
|
Style/SelectByRegexp:
|
367
501
|
Enabled: false
|
@@ -389,3 +523,7 @@ Style/TrivialAccessors:
|
|
389
523
|
# We prefer traditional bracket style for all arrays.
|
390
524
|
Style/WordArray:
|
391
525
|
EnforcedStyle: brackets
|
526
|
+
|
527
|
+
# Added in Rubocop 1.53
|
528
|
+
Style/YAMLFileRead:
|
529
|
+
Enabled: true
|
data/lib/google/style/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
20
|
+
version: '1.56'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
27
|
+
version: '1.56'
|
28
28
|
description: Shared style guide for Google's ruby projects
|
29
29
|
email:
|
30
30
|
- dazuma@google.com
|
@@ -51,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.7.0
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.4.19
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Collection of rubocop rules
|