google-style 1.25.0 → 1.25.3

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: e954fc240902e4faacb8fcdb6e4d40cd2b910e36408e73cc25cdf9010c2a7b10
4
- data.tar.gz: 58e410551ca3077977df5eed54c089e2a80e28482e6e9f07abf76e02594e67bc
3
+ metadata.gz: 1d63fa1f076e05ed7cde6660545ad129a071e4b5ab733f466a1095185e2445ec
4
+ data.tar.gz: 957c6b7a2ae2cbefdf53b609117a9d33c6e7fb1c2b9bf891918b3c3472ee541a
5
5
  SHA512:
6
- metadata.gz: a04d43f1bffbe7cb7edfb7a26039a95121c5aced3557a5fc233a3cdd37f4d673c577e69d3e8299a72fcd51fbb89aaf65621b91430f5e0668253ddbcd8f7af81f
7
- data.tar.gz: 46b22449cc84c46c005cc6b72e9a498a85e51e7b0f6aa54be308f2b186e8d659bfe04951cd3980a5a4e0b1b8f25a2e8786b891e1f05d21c6234b4f4d6e6858fe
6
+ metadata.gz: 3aa1169d288734527a11ce696d0a0e6ff5356975ebf94a651cb07bf9d417d54202a5c7deb844a476b252086aeba8ff9fab29f5b508ea87da400843c4408fce6d
7
+ data.tar.gz: 9c42c3e98454732f66674635d2ecf26efec565bbdf811be3869e4c4ecf0e9214eef9a512cdae3e4f40809eec63e0abf6372ef168dc6d8099d0b18ab350b13169
data/README.md CHANGED
@@ -45,13 +45,13 @@ For all `1.x.x` gem versions:
45
45
 
46
46
  Contributions to this library are always welcome and highly encouraged.
47
47
 
48
- See the [Contributing
49
- Guide](CONTRIBUTING.md)
48
+ See the {file:CONTRIBUTING.md Contributing
49
+ Guide}
50
50
  for more information on how to get started.
51
51
 
52
52
  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 [Code of
54
- Conduct](CODE_OF_CONDUCT.md)
53
+ participating in this project you agree to abide by its terms. See the {file:CODE_OF_CONDUCT.md Code of
54
+ Conduct}
55
55
  for more information.
56
56
 
57
57
  ## License
data/google-style.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  # Copyright 2019 Google LLC
2
-
2
+ #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
5
5
  # You may obtain a copy of the License at
6
-
6
+ #
7
7
  # https://www.apache.org/licenses/LICENSE-2.0
8
-
8
+ #
9
9
  # Unless required by applicable law or agreed to in writing, software
10
10
  # distributed under the License is distributed on an "AS IS" BASIS,
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -13,93 +13,225 @@
13
13
  # limitations under the License.
14
14
 
15
15
  AllCops:
16
- SuggestExtensions: true
16
+ NewCops: disable
17
+ SuggestExtensions: false
17
18
  TargetRubyVersion: 2.5
18
19
 
20
+ # Enforcing a blank line often worsens vertical layout.
19
21
  Layout/EmptyLineAfterGuardClause:
20
22
  Enabled: false
21
- Layout/EmptyLines: # for the extra line between copyright and code
23
+
24
+ # For the extra line between copyright and code.
25
+ Layout/EmptyLines:
22
26
  Enabled: false
27
+
28
+ # This tends to be problematic, especially for nested hashes. In many cases,
29
+ # our code adheres to the "table" style, but we do not want to enforce it.
23
30
  Layout/HashAlignment:
24
- EnforcedColonStyle: table
25
- EnforcedHashRocketStyle: table
31
+ Enabled: false
32
+
33
+ # Our current preferred line length.
26
34
  Layout/LineLength:
27
35
  Max: 120
36
+
37
+ # Added in Rubocop 1.7
28
38
  Layout/SpaceBeforeBrackets:
29
39
  Enabled: true
40
+
41
+ # Added in Rubocop 1.7
30
42
  Lint/AmbiguousAssignment:
31
43
  Enabled: true
44
+
45
+ # Added in Rubocop 1.8
32
46
  Lint/DeprecatedConstants:
33
47
  Enabled: true
48
+
49
+ # Added in Rubocop 1.3
34
50
  Lint/DuplicateBranch:
35
51
  Enabled: true
52
+
53
+ # Added in Rubocop 1.1
36
54
  Lint/DuplicateRegexpCharacterClassElement:
37
55
  Enabled: true
56
+
57
+ # Added in Rubocop 1.1
38
58
  Lint/EmptyBlock:
39
59
  Enabled: true
60
+
61
+ # Added in Rubocop 1.3
40
62
  Lint/EmptyClass:
41
63
  Enabled: true
64
+
65
+ # Added in Rubocop 1.8
42
66
  Lint/LambdaWithoutLiteralBlock:
43
67
  Enabled: true
68
+
69
+ # Added in Rubocop 1.2
44
70
  Lint/NoReturnInBeginEndBlocks:
45
71
  Enabled: true
72
+
73
+ # Added in Rubocop 1.9
74
+ Lint/NumberedParameterAssignment:
75
+ Enabled: true
76
+
77
+ # Added in Rubocop 1.9
78
+ Lint/OrAssignmentToConstant:
79
+ Enabled: true
80
+
81
+ # Added in Rubocop 1.8
46
82
  Lint/RedundantDirGlobSort:
47
83
  Enabled: true
84
+
85
+ # Added in Rubocop 1.9
86
+ Lint/SymbolConversion:
87
+ Enabled: true
88
+
89
+ # Added in Rubocop 1.1
48
90
  Lint/ToEnumArguments:
49
91
  Enabled: true
92
+
93
+ # Added in Rubocop 1.9
94
+ Lint/TripleQuotes:
95
+ Enabled: true
96
+
97
+ # Added in Rubocop 1.5
50
98
  Lint/UnexpectedBlockArity:
51
99
  Enabled: true
100
+
101
+ # Added in Rubocop 1.1
52
102
  Lint/UnmodifiedReduceAccumulator:
53
103
  Enabled: true
104
+
54
105
  Metrics/AbcSize:
55
106
  Max: 30
107
+
56
108
  Metrics/CyclomaticComplexity:
57
109
  Max: 10
110
+
58
111
  Metrics/MethodLength:
59
112
  Max: 25
113
+
114
+ # Sometimes problematic for API calls which might have a lot of parameters,
115
+ # and for generated code.
60
116
  Metrics/ParameterLists:
61
117
  Enabled: false
118
+
62
119
  Metrics/PerceivedComplexity:
63
120
  Max: 10
121
+
122
+ # Does not allow distinguishing verbs (e.g. is vs has). Also causes problems
123
+ # for generated code that might have generated method names.
124
+ Naming/PredicateName:
125
+ Enabled: false
126
+
127
+ # Numbers are occasionally semantically useful in names, and also occasionally
128
+ # appear in generated code.
64
129
  Naming/VariableNumber:
65
130
  Enabled: false
131
+
132
+ # Better to separate accessors for yardoc and type declarations.
133
+ Style/AccessorGrouping:
134
+ EnforcedStyle: separated
135
+
136
+ # Added in Rubocop 1.1
66
137
  Style/ArgumentsForwarding:
67
138
  Enabled: true
139
+
140
+ # Problematic for generated code which might include unicode in comments.
141
+ Style/AsciiComments:
142
+ Enabled: false
143
+
144
+ # There are cases where we use the === operator as a general interface, e.g.
145
+ # when specifying type checker objects.
146
+ Style/CaseEquality:
147
+ Enabled: false
148
+
149
+ # Added in Rubocop 1.2
68
150
  Style/CollectionCompact:
69
151
  Enabled: true
152
+
153
+ # Added in Rubocop 1.1
70
154
  Style/DocumentDynamicEvalDefinition:
71
155
  Enabled: true
156
+
157
+ # We prefer consistent method indentation.
72
158
  Style/EmptyMethod:
73
159
  EnforcedStyle: expanded
160
+
161
+ # Added in Rubocop 1.8
74
162
  Style/EndlessMethod:
75
163
  Enabled: true
164
+
165
+ # Frozen string literals are no more as of Ruby 3.
76
166
  Style/FrozenStringLiteralComment:
77
167
  Enabled: false
168
+
169
+ # Added in Rubocop 1.7
78
170
  Style/HashExcept:
79
171
  Enabled: true
172
+
173
+ # It is sometimes preferable to use the non-modifier form even for single-line
174
+ # expressions, for readability.
175
+ Style/IfUnlessModifier:
176
+ Enabled: false
177
+
178
+ # Added in Rubocop 1.9
179
+ Style/IfWithBooleanLiteralBranches:
180
+ Enabled: true
181
+
182
+ # We adopt Seattle-style paren usage
80
183
  Style/MethodCallWithArgsParentheses:
81
184
  AllowParenthesesInCamelCaseMethod: true
82
185
  AllowParenthesesInChaining: true
83
186
  AllowParenthesesInMultilineCall: true
84
187
  Enabled: true
85
188
  EnforcedStyle: omit_parentheses
189
+
190
+ # We adopt Seattle-style paren usage
86
191
  Style/MethodDefParentheses:
87
192
  EnforcedStyle: require_no_parentheses
193
+
194
+ # Enable use of the different semantics of module_function and extend self.
195
+ Style/ModuleFunction:
196
+ Enabled: false
197
+
198
+ # Added in Rubocop 1.2
88
199
  Style/NegatedIfElseCondition:
89
200
  Enabled: true
201
+
202
+ # Added in Rubocop 1.3
90
203
  Style/NilLambda:
91
204
  Enabled: true
205
+
206
+ # Added in Rubocop 1.4
92
207
  Style/RedundantArgument:
93
208
  Enabled: true
209
+
210
+ # Disabled because we prefer to keep begin-end blocks in memoization for
211
+ # readability (see https://github.com/rubocop/rubocop/pull/9602).
212
+ Style/RedundantBegin:
213
+ Enabled: false
214
+
215
+ # The idiom is useful in a variety of cases. We prefer to allow it.
94
216
  Style/RescueModifier:
95
217
  Enabled: false
218
+
219
+ # We prefer standardizing on double-quoted strings for readability.
96
220
  Style/StringLiterals:
97
221
  EnforcedStyle: double_quotes
222
+
223
+ # Added in Rubocop 1.1
98
224
  Style/SwapValues:
99
225
  Enabled: true
226
+
227
+ # We prefer traditional bracket style for all arrays.
100
228
  Style/SymbolArray:
101
229
  EnforcedStyle: brackets
230
+
231
+ # There are some cases where a full method shows intent better than an attr.
102
232
  Style/TrivialAccessors:
103
233
  Enabled: false
234
+
235
+ # We prefer traditional bracket style for all arrays.
104
236
  Style/WordArray:
105
237
  EnforcedStyle: brackets
@@ -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.25.3"
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.0
4
+ version: 1.25.3
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-01-28 00:00:00.000000000 Z
12
+ date: 2022-05-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rubocop
@@ -16,14 +17,14 @@ dependencies:
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: '1.8'
20
+ version: 1.28.2
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.8'
27
+ version: 1.28.2
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: bundler
29
30
  requirement: !ruby/object:Gem::Requirement
@@ -54,6 +55,7 @@ dependencies:
54
55
  version: '12.3'
55
56
  description: Shared style guide for Google's ruby projects
56
57
  email:
58
+ - dazuma@google.com
57
59
  - paye@google.com
58
60
  executables: []
59
61
  extensions: []
@@ -64,7 +66,8 @@ files:
64
66
  - LICENSE
65
67
  - README.md
66
68
  - google-style.yml
67
- homepage: https://github.com/googleapis/ruby-style/tree/master/
69
+ - lib/google/style/version.rb
70
+ homepage: https://github.com/googleapis/ruby-style/
68
71
  licenses:
69
72
  - Apache-2.0
70
73
  metadata: {}
@@ -83,8 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
86
  - !ruby/object:Gem::Version
84
87
  version: '0'
85
88
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.7.6
89
+ rubygems_version: 3.3.5
88
90
  signing_key:
89
91
  specification_version: 4
90
92
  summary: Collection of rubocop rules