google-style 1.25.3 → 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: 1d63fa1f076e05ed7cde6660545ad129a071e4b5ab733f466a1095185e2445ec
4
- data.tar.gz: 957c6b7a2ae2cbefdf53b609117a9d33c6e7fb1c2b9bf891918b3c3472ee541a
3
+ metadata.gz: ddaff33d2cc315a8556e8c10de5fb5559eb4af9135cac54ff8887b0bdbcc3836
4
+ data.tar.gz: 8face950d19f86e994dad1766a658a4870ffbccea2ebb294af32fd64dc4cedc7
5
5
  SHA512:
6
- metadata.gz: 3aa1169d288734527a11ce696d0a0e6ff5356975ebf94a651cb07bf9d417d54202a5c7deb844a476b252086aeba8ff9fab29f5b508ea87da400843c4408fce6d
7
- data.tar.gz: 9c42c3e98454732f66674635d2ecf26efec565bbdf811be3869e4c4ecf0e9214eef9a512cdae3e4f40809eec63e0abf6372ef168dc6d8099d0b18ab350b13169
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 {file:CONTRIBUTING.md Contributing
49
- Guide}
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
- 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.
54
+ participating in this project you agree to abide by its terms. See the [Code of
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,14 +283,47 @@ 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
@@ -212,10 +333,26 @@ Style/RedundantArgument:
212
333
  Style/RedundantBegin:
213
334
  Enabled: false
214
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
+
215
344
  # The idiom is useful in a variety of cases. We prefer to allow it.
216
345
  Style/RescueModifier:
217
346
  Enabled: false
218
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
+
219
356
  # We prefer standardizing on double-quoted strings for readability.
220
357
  Style/StringLiterals:
221
358
  EnforcedStyle: double_quotes
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Google
18
18
  module Style
19
- VERSION = "1.25.3"
19
+ VERSION = "1.26.0"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.3
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  - Graham Paye
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-05-06 00:00:00.000000000 Z
12
+ date: 2022-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,42 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.28.2
20
+ version: '1.30'
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.28.2
28
- - !ruby/object:Gem::Dependency
29
- name: bundler
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '2.0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '2.0'
42
- - !ruby/object:Gem::Dependency
43
- name: rake
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '12.3'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '12.3'
27
+ version: '1.30'
56
28
  description: Shared style guide for Google's ruby projects
57
29
  email:
58
30
  - dazuma@google.com
@@ -71,7 +43,7 @@ homepage: https://github.com/googleapis/ruby-style/
71
43
  licenses:
72
44
  - Apache-2.0
73
45
  metadata: {}
74
- post_install_message:
46
+ post_install_message:
75
47
  rdoc_options: []
76
48
  require_paths:
77
49
  - lib
@@ -79,15 +51,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
51
  requirements:
80
52
  - - ">="
81
53
  - !ruby/object:Gem::Version
82
- version: 2.5.0
54
+ version: 2.6.0
83
55
  required_rubygems_version: !ruby/object:Gem::Requirement
84
56
  requirements:
85
57
  - - ">="
86
58
  - !ruby/object:Gem::Version
87
59
  version: '0'
88
60
  requirements: []
89
- rubygems_version: 3.3.5
90
- signing_key:
61
+ rubygems_version: 3.3.7
62
+ signing_key:
91
63
  specification_version: 4
92
64
  summary: Collection of rubocop rules
93
65
  test_files: []