google-style 1.25.2 → 1.26.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 642e8669ef6ba1abaf3f85c254735d0282f39dbdc3b09335a3bfdb0d8112909e
4
- data.tar.gz: f9bec1c16dda8668e61e272f8d1e9c3137bfa843bc4ccedd3d0cb5c24c69338a
3
+ metadata.gz: fa90af2ef1f40c43821166303755429a57f478c0674fa8b3b97a019e53018a3f
4
+ data.tar.gz: 2f59c7078749ffadb4aa643ae7ad9ffd67785e9db0e9335e0f3979329403a45c
5
5
  SHA512:
6
- metadata.gz: dfcfe24caf4cf56e27f5368cc7054f8ca63a8073ca8eb3f8f8e916496bafb6e52a479b8458c607e3ee03ec2e246bf19eadd582ad6bd03824550994252da89ca7
7
- data.tar.gz: ef48b6b27a48bf78501f0d9dee7a771943a1dfadb98c9916aaa158ca6846e735c5446f0a194b2f7ad2eaa87907ce109dd16b38d90a093c977380e5c96bdba35a
6
+ metadata.gz: 22db03593c84225b5db41a7f4d007131df77b837ca470e4db1d37ee40c72e0324d7b1d211b38c8ca4bfa44e076406595f4b60664ec832a61fd7dd87d6ae1276c
7
+ data.tar.gz: cd28ec976dbdb2ef46612915178dd2d23a08055a45e5f22634fedb4837e1a309dfaa0bf8a3d2e66222d777358de1c56053a3e3918dada420f361306cf111eac7
data/README.md CHANGED
@@ -33,40 +33,28 @@ bundle exec rubocop
33
33
 
34
34
  ## Versioning
35
35
 
36
- For all `1.x.x` gem versions:
36
+ For all `1.x.y` gem versions, the target and required Ruby version will match
37
+ the minor gem version. Hence, `1.26.y` versions target and require Ruby 2.6.
38
+ `1.30.y` versions target and require Ruby 3.0, and so forth.
37
39
 
38
- - The target and required Ruby version will match the minor gem version. `1.24.0` targets Ruby 2.4. When `1.25.0` is released, it will target Ruby 2.5, and `1.30.0` will target Ruby 3.0.
39
-
40
- - During a minor version bump, the rubocop dependency will be updated to the latest version.
41
-
42
- - For these reasons, it is highly recommended that dependencies specify at least a specific minor version of this gem.
40
+ During a minor version bump, the rubocop dependency will be updated to the
41
+ latest version, and we will enable new checks up to and including that version.
42
+ Thus, code that passed using one minor version might not pass using the next.
43
+ Hence, dependencies should generally follow the pattern `~> 1.x.y` to pin to a
44
+ specific minor version.
43
45
 
44
46
  ## Contributing
45
47
 
46
48
  Contributions to this library are always welcome and highly encouraged.
47
49
 
48
- See the {file:CONTRIBUTING.md Contributing
49
- Guide}
50
+ See the {file:CONTRIBUTING.md Contributing Guide}
50
51
  for more information on how to get started.
51
52
 
52
53
  Please note that this project is released with a Contributor Code of Conduct. By
53
54
  participating in this project you agree to abide by its terms. See the {file:CODE_OF_CONDUCT.md Code of
54
- Conduct}
55
- for more information.
55
+ Conduct} for more information.
56
56
 
57
57
  ## License
58
58
 
59
59
  This library is licensed under Apache 2.0. Full license text is available in
60
60
  [LICENSE](LICENSE).
61
-
62
- ## Supported Ruby Versions
63
-
64
- These libraries are currently supported on Ruby 2.4+.
65
-
66
- Google provides official support for Ruby versions that are actively supported
67
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or
68
- in security maintenance, and not end of life. Currently, this means Ruby 2.4
69
- and later. Starting with Ruby 2.4, minor releases of the google-style gem under
70
- `1.x.x` will correspond with the required Ruby version, with `1.24.x` requiring
71
- Ruby 2.4.
72
- See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
data/google-style.yml CHANGED
@@ -15,7 +15,15 @@
15
15
  AllCops:
16
16
  NewCops: disable
17
17
  SuggestExtensions: false
18
- TargetRubyVersion: 2.5
18
+ TargetRubyVersion: 2.6
19
+
20
+ # Added in Rubocop 1.30
21
+ Gemspec/DeprecatedAttributeAssignment:
22
+ Enabled: true
23
+
24
+ # Disabled for now.
25
+ Gemspec/RequireMFA:
26
+ Enabled: false
19
27
 
20
28
  # Enforcing a blank line often worsens vertical layout.
21
29
  Layout/EmptyLineAfterGuardClause:
@@ -30,6 +38,18 @@ Layout/EmptyLines:
30
38
  Layout/HashAlignment:
31
39
  Enabled: false
32
40
 
41
+ # Added in Rubocop 1.31
42
+ Layout/LineContinuationLeadingSpace:
43
+ Enabled: true
44
+
45
+ # Added in Rubocop 1.31
46
+ Layout/LineContinuationSpacing:
47
+ Enabled: true
48
+
49
+ # Added in Rubocop 1.18
50
+ Layout/LineEndStringConcatenationIndentation:
51
+ Enabled: true
52
+
33
53
  # Our current preferred line length.
34
54
  Layout/LineLength:
35
55
  Max: 120
@@ -42,6 +62,18 @@ Layout/SpaceBeforeBrackets:
42
62
  Lint/AmbiguousAssignment:
43
63
  Enabled: true
44
64
 
65
+ # Added in Rubocop 1.21
66
+ Lint/AmbiguousOperatorPrecedence:
67
+ Enabled: true
68
+
69
+ # Added in Rubocop 1.19
70
+ Lint/AmbiguousRange:
71
+ Enabled: true
72
+
73
+ # Added in Rubocop 1.31
74
+ Lint/ConstantOverwrittenInRescue:
75
+ Enabled: true
76
+
45
77
  # Added in Rubocop 1.8
46
78
  Lint/DeprecatedConstants:
47
79
  Enabled: true
@@ -62,6 +94,14 @@ Lint/EmptyBlock:
62
94
  Lint/EmptyClass:
63
95
  Enabled: true
64
96
 
97
+ # Added in Rubocop 1.16
98
+ Lint/EmptyInPattern:
99
+ Enabled: true
100
+
101
+ # Added in Rubocop 1.21
102
+ Lint/IncompatibleIoSelectWithFiberScheduler:
103
+ Enabled: true
104
+
65
105
  # Added in Rubocop 1.8
66
106
  Lint/LambdaWithoutLiteralBlock:
67
107
  Enabled: true
@@ -70,6 +110,10 @@ Lint/LambdaWithoutLiteralBlock:
70
110
  Lint/NoReturnInBeginEndBlocks:
71
111
  Enabled: true
72
112
 
113
+ # Added in Rubocop 1.31
114
+ Lint/NonAtomicFileOperation:
115
+ Enabled: true
116
+
73
117
  # Added in Rubocop 1.9
74
118
  Lint/NumberedParameterAssignment:
75
119
  Enabled: true
@@ -82,6 +126,14 @@ Lint/OrAssignmentToConstant:
82
126
  Lint/RedundantDirGlobSort:
83
127
  Enabled: true
84
128
 
129
+ # Added in Rubocop 1.27
130
+ Lint/RefinementImportMethods:
131
+ Enabled: true
132
+
133
+ # Added in Rubocop 1.22
134
+ Lint/RequireRelativeSelfPath:
135
+ Enabled: true
136
+
85
137
  # Added in Rubocop 1.9
86
138
  Lint/SymbolConversion:
87
139
  Enabled: true
@@ -102,6 +154,10 @@ Lint/UnexpectedBlockArity:
102
154
  Lint/UnmodifiedReduceAccumulator:
103
155
  Enabled: true
104
156
 
157
+ # Added in Rubocop 1.23
158
+ Lint/UselessRuby2Keywords:
159
+ Enabled: true
160
+
105
161
  Metrics/AbcSize:
106
162
  Max: 30
107
163
 
@@ -119,6 +175,10 @@ Metrics/ParameterLists:
119
175
  Metrics/PerceivedComplexity:
120
176
  Max: 10
121
177
 
178
+ # Added in Rubocop 1.24
179
+ Naming/BlockForwarding:
180
+ Enabled: true
181
+
122
182
  # Does not allow distinguishing verbs (e.g. is vs has). Also causes problems
123
183
  # for generated code that might have generated method names.
124
184
  Naming/PredicateName:
@@ -129,6 +189,14 @@ Naming/PredicateName:
129
189
  Naming/VariableNumber:
130
190
  Enabled: false
131
191
 
192
+ # Added in Rubocop 1.28
193
+ Security/CompoundHash:
194
+ Enabled: true
195
+
196
+ # Added in Rubocop 1.22
197
+ Security/IoMethods:
198
+ Enabled: true
199
+
132
200
  # Better to separate accessors for yardoc and type declarations.
133
201
  Style/AccessorGrouping:
134
202
  EnforcedStyle: separated
@@ -162,10 +230,30 @@ Style/EmptyMethod:
162
230
  Style/EndlessMethod:
163
231
  Enabled: true
164
232
 
233
+ # Added in Rubocop 1.29
234
+ Style/EnvHome:
235
+ Enabled: true
236
+
237
+ # This check is overly paranoid.
238
+ Style/FetchEnvVar:
239
+ Enabled: false
240
+
241
+ # Added in Rubocop 1.24
242
+ Style/FileRead:
243
+ Enabled: true
244
+
245
+ # Added in Rubocop 1.24
246
+ Style/FileWrite:
247
+ Enabled: true
248
+
165
249
  # Frozen string literals are no more as of Ruby 3.
166
250
  Style/FrozenStringLiteralComment:
167
251
  Enabled: false
168
252
 
253
+ # Added in Rubocop 1.10
254
+ Style/HashConversion:
255
+ Enabled: true
256
+
169
257
  # Added in Rubocop 1.7
170
258
  Style/HashExcept:
171
259
  Enabled: true
@@ -179,6 +267,18 @@ Style/IfUnlessModifier:
179
267
  Style/IfWithBooleanLiteralBranches:
180
268
  Enabled: true
181
269
 
270
+ # Added in Rubocop 1.16
271
+ Style/InPatternThen:
272
+ Enabled: true
273
+
274
+ # Added in Rubocop 1.30
275
+ Style/MapCompactWithConditionalBlock:
276
+ Enabled: true
277
+
278
+ # Added in Rubocop 1.24
279
+ Style/MapToHash:
280
+ Enabled: true
281
+
182
282
  # We adopt Seattle-style paren usage
183
283
  Style/MethodCallWithArgsParentheses:
184
284
  AllowParenthesesInCamelCaseMethod: true
@@ -195,14 +295,47 @@ Style/MethodDefParentheses:
195
295
  Style/ModuleFunction:
196
296
  Enabled: false
197
297
 
298
+ # Added in Rubocop 1.16
299
+ Style/MultilineInPatternThen:
300
+ Enabled: true
301
+
198
302
  # Added in Rubocop 1.2
199
303
  Style/NegatedIfElseCondition:
200
304
  Enabled: true
201
305
 
306
+ # Added in Rubocop 1.26
307
+ Style/NestedFileDirname:
308
+ Enabled: true
309
+
202
310
  # Added in Rubocop 1.3
203
311
  Style/NilLambda:
204
312
  Enabled: true
205
313
 
314
+ # Added in Rubocop 1.22
315
+ Style/NumberedParameters:
316
+ Enabled: true
317
+
318
+ # Added in Rubocop 1.22
319
+ Style/NumberedParametersLimit:
320
+ Enabled: true
321
+
322
+ # Added in Rubocop 1.28
323
+ Style/ObjectThen:
324
+ Enabled: true
325
+
326
+ # Disabled for tests but left enabled for production code.
327
+ # Added in Rubocop 1.23
328
+ Style/OpenStructUse:
329
+ Enabled: true
330
+ Exclude:
331
+ - "test/**/*.rb"
332
+ - "acceptance/**/*.rb"
333
+ - "samples/acceptance/**/*.rb"
334
+
335
+ # Added in Rubocop 1.16
336
+ Style/QuotedSymbols:
337
+ Enabled: true
338
+
206
339
  # Added in Rubocop 1.4
207
340
  Style/RedundantArgument:
208
341
  Enabled: true
@@ -212,10 +345,26 @@ Style/RedundantArgument:
212
345
  Style/RedundantBegin:
213
346
  Enabled: false
214
347
 
348
+ # Added in Rubocop 1.27
349
+ Style/RedundantInitialize:
350
+ Enabled: true
351
+
352
+ # Added in Rubocop 1.19
353
+ Style/RedundantSelfAssignmentBranch:
354
+ Enabled: true
355
+
215
356
  # The idiom is useful in a variety of cases. We prefer to allow it.
216
357
  Style/RescueModifier:
217
358
  Enabled: false
218
359
 
360
+ # We disagree with this one. Grep is more specialized than select/reject
361
+ Style/SelectByRegexp:
362
+ Enabled: false
363
+
364
+ # Added in Rubocop 1.12
365
+ Style/StringChars:
366
+ Enabled: true
367
+
219
368
  # We prefer standardizing on double-quoted strings for readability.
220
369
  Style/StringLiterals:
221
370
  EnforcedStyle: double_quotes
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Google
18
18
  module Style
19
- VERSION = "1.25.2"
19
+ VERSION = "1.26.1"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.2
4
+ version: 1.26.1
5
5
  platform: ruby
6
6
  authors:
7
+ - Daniel Azuma
7
8
  - Graham Paye
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2021-09-23 00:00:00.000000000 Z
12
+ date: 2022-06-27 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rubocop
@@ -16,44 +17,17 @@ dependencies:
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: '1.9'
20
+ version: '1.31'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
- version: '1.9'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '12.3'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '12.3'
27
+ version: '1.31'
55
28
  description: Shared style guide for Google's ruby projects
56
29
  email:
30
+ - dazuma@google.com
57
31
  - paye@google.com
58
32
  executables: []
59
33
  extensions: []
@@ -77,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
51
  requirements:
78
52
  - - ">="
79
53
  - !ruby/object:Gem::Version
80
- version: 2.5.0
54
+ version: 2.6.0
81
55
  required_rubygems_version: !ruby/object:Gem::Requirement
82
56
  requirements:
83
57
  - - ">="
84
58
  - !ruby/object:Gem::Version
85
59
  version: '0'
86
60
  requirements: []
87
- rubygems_version: 3.2.17
61
+ rubygems_version: 3.3.14
88
62
  signing_key:
89
63
  specification_version: 4
90
64
  summary: Collection of rubocop rules