google-style 1.25.1 → 1.26.0

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: c8b6fc152c4c0d78c5e933d64a1a9b5fd355aaa18f9e889efe073994b75a4379
4
- data.tar.gz: e3e0dbcdfd7beb63b8201d1083c3bbad01a0c46069edbe23ed0e0247e356857b
3
+ metadata.gz: ddaff33d2cc315a8556e8c10de5fb5559eb4af9135cac54ff8887b0bdbcc3836
4
+ data.tar.gz: 8face950d19f86e994dad1766a658a4870ffbccea2ebb294af32fd64dc4cedc7
5
5
  SHA512:
6
- metadata.gz: 36145174df5f7281ac6d953b806a55d9ac3422ce2a5f66ea9b5e64e93dfa30dc0e61d8386d118231d055a49731fa7ae186b3ed0be3e106de97c0fdf8217fd4d7
7
- data.tar.gz: 976ea6551cd0d27b8b6cc412fd5d7920667181f6569698206f78225fef423690ca65b8aa913e0a39405e06b4327aa149e208705d61c8e701f009ad3eeb503fe0
6
+ metadata.gz: f66d50b81fbeef78654f9c1b0ce532a5779d38866894ff1d79970192917eb47d07e789503e792e1e0b92f6f109232854baa6b8ad87c4eeecca467e1864d3b98d
7
+ data.tar.gz: 3547fb4bce7a282685bf28dc6992f4089091e00a6d89ecd93e9eef4e3b1ba5c93ebf0839968e6f396b7658ae2a9cfad297a844e538988371d43a71bfd73bb662
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 [Contributing
49
- Guide](CONTRIBUTING.md)
50
+ See the [Contributing Guide](CONTRIBUTING.md)
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 [Code of
54
- Conduct](CODE_OF_CONDUCT.md)
55
- for more information.
55
+ Conduct](CODE_OF_CONDUCT.md) 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,19 @@
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.10
21
+ Gemspec/DateAssignment:
22
+ Enabled: true
23
+
24
+ # Added in Rubocop 1.30
25
+ Gemspec/DeprecatedAttributeAssignment:
26
+ Enabled: true
27
+
28
+ # Disabled for now.
29
+ Gemspec/RequireMFA:
30
+ Enabled: false
19
31
 
20
32
  # Enforcing a blank line often worsens vertical layout.
21
33
  Layout/EmptyLineAfterGuardClause:
@@ -30,6 +42,10 @@ Layout/EmptyLines:
30
42
  Layout/HashAlignment:
31
43
  Enabled: false
32
44
 
45
+ # Added in Rubocop 1.18
46
+ Layout/LineEndStringConcatenationIndentation:
47
+ Enabled: true
48
+
33
49
  # Our current preferred line length.
34
50
  Layout/LineLength:
35
51
  Max: 120
@@ -42,6 +58,14 @@ Layout/SpaceBeforeBrackets:
42
58
  Lint/AmbiguousAssignment:
43
59
  Enabled: true
44
60
 
61
+ # Added in Rubocop 1.21
62
+ Lint/AmbiguousOperatorPrecedence:
63
+ Enabled: true
64
+
65
+ # Added in Rubocop 1.19
66
+ Lint/AmbiguousRange:
67
+ Enabled: true
68
+
45
69
  # Added in Rubocop 1.8
46
70
  Lint/DeprecatedConstants:
47
71
  Enabled: true
@@ -62,6 +86,14 @@ Lint/EmptyBlock:
62
86
  Lint/EmptyClass:
63
87
  Enabled: true
64
88
 
89
+ # Added in Rubocop 1.16
90
+ Lint/EmptyInPattern:
91
+ Enabled: true
92
+
93
+ # Added in Rubocop 1.21
94
+ Lint/IncompatibleIoSelectWithFiberScheduler:
95
+ Enabled: true
96
+
65
97
  # Added in Rubocop 1.8
66
98
  Lint/LambdaWithoutLiteralBlock:
67
99
  Enabled: true
@@ -82,6 +114,14 @@ Lint/OrAssignmentToConstant:
82
114
  Lint/RedundantDirGlobSort:
83
115
  Enabled: true
84
116
 
117
+ # Added in Rubocop 1.27
118
+ Lint/RefinementImportMethods:
119
+ Enabled: true
120
+
121
+ # Added in Rubocop 1.22
122
+ Lint/RequireRelativeSelfPath:
123
+ Enabled: true
124
+
85
125
  # Added in Rubocop 1.9
86
126
  Lint/SymbolConversion:
87
127
  Enabled: true
@@ -102,6 +142,10 @@ Lint/UnexpectedBlockArity:
102
142
  Lint/UnmodifiedReduceAccumulator:
103
143
  Enabled: true
104
144
 
145
+ # Added in Rubocop 1.23
146
+ Lint/UselessRuby2Keywords:
147
+ Enabled: true
148
+
105
149
  Metrics/AbcSize:
106
150
  Max: 30
107
151
 
@@ -119,6 +163,10 @@ Metrics/ParameterLists:
119
163
  Metrics/PerceivedComplexity:
120
164
  Max: 10
121
165
 
166
+ # Added in Rubocop 1.24
167
+ Naming/BlockForwarding:
168
+ Enabled: true
169
+
122
170
  # Does not allow distinguishing verbs (e.g. is vs has). Also causes problems
123
171
  # for generated code that might have generated method names.
124
172
  Naming/PredicateName:
@@ -129,6 +177,14 @@ Naming/PredicateName:
129
177
  Naming/VariableNumber:
130
178
  Enabled: false
131
179
 
180
+ # Added in Rubocop 1.28
181
+ Security/CompoundHash:
182
+ Enabled: true
183
+
184
+ # Added in Rubocop 1.22
185
+ Security/IoMethods:
186
+ Enabled: true
187
+
132
188
  # Better to separate accessors for yardoc and type declarations.
133
189
  Style/AccessorGrouping:
134
190
  EnforcedStyle: separated
@@ -162,10 +218,30 @@ Style/EmptyMethod:
162
218
  Style/EndlessMethod:
163
219
  Enabled: true
164
220
 
221
+ # Added in Rubocop 1.29
222
+ Style/EnvHome:
223
+ Enabled: true
224
+
225
+ # This check is overly paranoid.
226
+ Style/FetchEnvVar:
227
+ Enabled: false
228
+
229
+ # Added in Rubocop 1.24
230
+ Style/FileRead:
231
+ Enabled: true
232
+
233
+ # Added in Rubocop 1.24
234
+ Style/FileWrite:
235
+ Enabled: true
236
+
165
237
  # Frozen string literals are no more as of Ruby 3.
166
238
  Style/FrozenStringLiteralComment:
167
239
  Enabled: false
168
240
 
241
+ # Added in Rubocop 1.10
242
+ Style/HashConversion:
243
+ Enabled: true
244
+
169
245
  # Added in Rubocop 1.7
170
246
  Style/HashExcept:
171
247
  Enabled: true
@@ -179,6 +255,18 @@ Style/IfUnlessModifier:
179
255
  Style/IfWithBooleanLiteralBranches:
180
256
  Enabled: true
181
257
 
258
+ # Added in Rubocop 1.16
259
+ Style/InPatternThen:
260
+ Enabled: true
261
+
262
+ # Added in Rubocop 1.30
263
+ Style/MapCompactWithConditionalBlock:
264
+ Enabled: true
265
+
266
+ # Added in Rubocop 1.24
267
+ Style/MapToHash:
268
+ Enabled: true
269
+
182
270
  # We adopt Seattle-style paren usage
183
271
  Style/MethodCallWithArgsParentheses:
184
272
  AllowParenthesesInCamelCaseMethod: true
@@ -195,22 +283,76 @@ Style/MethodDefParentheses:
195
283
  Style/ModuleFunction:
196
284
  Enabled: false
197
285
 
286
+ # Added in Rubocop 1.16
287
+ Style/MultilineInPatternThen:
288
+ Enabled: true
289
+
198
290
  # Added in Rubocop 1.2
199
291
  Style/NegatedIfElseCondition:
200
292
  Enabled: true
201
293
 
294
+ # Added in Rubocop 1.26
295
+ Style/NestedFileDirname:
296
+ Enabled: true
297
+
202
298
  # Added in Rubocop 1.3
203
299
  Style/NilLambda:
204
300
  Enabled: true
205
301
 
302
+ # Added in Rubocop 1.22
303
+ Style/NumberedParameters:
304
+ Enabled: true
305
+
306
+ # Added in Rubocop 1.22
307
+ Style/NumberedParametersLimit:
308
+ Enabled: true
309
+
310
+ # Added in Rubocop 1.28
311
+ Style/ObjectThen:
312
+ Enabled: true
313
+
314
+ # Disabled for tests but left enabled for production code.
315
+ # Added in Rubocop 1.23
316
+ Style/OpenStructUse:
317
+ Enabled: true
318
+ Exclude:
319
+ - "test/**/*.rb"
320
+ - "acceptance/**/*.rb"
321
+ - "samples/acceptance/**/*.rb"
322
+
323
+ # Added in Rubocop 1.16
324
+ Style/QuotedSymbols:
325
+ Enabled: true
326
+
206
327
  # Added in Rubocop 1.4
207
328
  Style/RedundantArgument:
208
329
  Enabled: true
209
330
 
331
+ # Disabled because we prefer to keep begin-end blocks in memoization for
332
+ # readability (see https://github.com/rubocop/rubocop/pull/9602).
333
+ Style/RedundantBegin:
334
+ Enabled: false
335
+
336
+ # Added in Rubocop 1.27
337
+ Style/RedundantInitialize:
338
+ Enabled: true
339
+
340
+ # Added in Rubocop 1.19
341
+ Style/RedundantSelfAssignmentBranch:
342
+ Enabled: true
343
+
210
344
  # The idiom is useful in a variety of cases. We prefer to allow it.
211
345
  Style/RescueModifier:
212
346
  Enabled: false
213
347
 
348
+ # We disagree with this one. Grep is more specialized than select/reject
349
+ Style/SelectByRegexp:
350
+ Enabled: false
351
+
352
+ # Added in Rubocop 1.12
353
+ Style/StringChars:
354
+ Enabled: true
355
+
214
356
  # We prefer standardizing on double-quoted strings for readability.
215
357
  Style/StringLiterals:
216
358
  EnforcedStyle: double_quotes
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module Google
18
+ module Style
19
+ VERSION = "1.26.0"
20
+ end
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.1
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Daniel Azuma
7
8
  - Graham Paye
8
- autorequire:
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
12
+ date: 2022-05-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.30'
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.30'
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: []
@@ -64,11 +38,12 @@ files:
64
38
  - LICENSE
65
39
  - README.md
66
40
  - google-style.yml
67
- homepage: https://github.com/googleapis/ruby-style/tree/master/
41
+ - lib/google/style/version.rb
42
+ homepage: https://github.com/googleapis/ruby-style/
68
43
  licenses:
69
44
  - Apache-2.0
70
45
  metadata: {}
71
- post_install_message:
46
+ post_install_message:
72
47
  rdoc_options: []
73
48
  require_paths:
74
49
  - lib
@@ -76,15 +51,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
51
  requirements:
77
52
  - - ">="
78
53
  - !ruby/object:Gem::Version
79
- version: 2.5.0
54
+ version: 2.6.0
80
55
  required_rubygems_version: !ruby/object:Gem::Requirement
81
56
  requirements:
82
57
  - - ">="
83
58
  - !ruby/object:Gem::Version
84
59
  version: '0'
85
60
  requirements: []
86
- rubygems_version: 3.1.4
87
- signing_key:
61
+ rubygems_version: 3.3.7
62
+ signing_key:
88
63
  specification_version: 4
89
64
  summary: Collection of rubocop rules
90
65
  test_files: []