ezcater_rubocop 2.5.0 → 3.0.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: 3e4c9156d1f1e5ccdc48028b627a413ae3ff87a7bf47ec574943d2d755efe5aa
4
- data.tar.gz: 490b59709998f04a6c873d210f028ddb6d045dabccce60e4a962f38f2ac1584d
3
+ metadata.gz: 511f81e30ff5765d51a825d7b8606ebfa3c05d34e8c567dc7876ea7140e63d8a
4
+ data.tar.gz: f01eb84d2556225ac5be3e2c0ec206b6c1f5f8dc3fa8f6ad5bf6de400b474514
5
5
  SHA512:
6
- metadata.gz: 5645db771b9fd242d08b92eb300f29c57a51bb089466e5f3c4f269261972e786a8cf0a3f9b051eb401acfb001d2cacc024e292b6291243c9b086ebafb90fe392
7
- data.tar.gz: f9b580d5a79630d70c77d06fb3f5922f39a2a2fafd70ec587f162409553ccc8e4bf28ed55d1f68ae0b6daa279faed0f7f88c69c4c6998bec039cd29a8b27210f
6
+ metadata.gz: 6283449ed5c2181a90557d786e074e285841c8fc8ea5f0d693fd40d52c536121b50267d0352d266e60ed3bb62e1d2aae0be87f64024cb9418cf65daf7311993f
7
+ data.tar.gz: 5385a45fb8dfb260eda7d3fdaf8adaf3dc2b05f6ab6532c622744f4c2c4fab06ac3909b71d74ba7bc4a68fc87bf311f7d69246afcbb84c62f12912c6f215c3f3
data/CHANGELOG.md CHANGED
@@ -6,8 +6,30 @@ This gem is moving onto its own [Semantic Versioning](https://semver.org/) schem
6
6
 
7
7
  Prior to v1.0.0 this gem was versioned based on the `MAJOR`.`MINOR` version of RuboCop. The first release of the ezcater_rubocop gem was `v0.49.0`.
8
8
 
9
- ## v2.5.0
10
- - Update rubocop to 0.90.0
9
+ ## v3.0.0
10
+ - Upgrade rubocop: 1.16.0
11
+ - Upgrade rubocop-rails: 2.10.1
12
+ - Upgrade rubocop-rspec: 2.3.0
13
+ - This is a major upgrade because a large number of cops have been introduced, tweaked, or renamed. Here is an aggregate of the breaking changes introduced
14
+ - RuboCop assumes that Cop classes do not define new `on_<type>` methods at runtime (e.g. via `extend` in `initialize`).
15
+ - Enable all pending cops for RuboCop 1.0.
16
+ - Change logic for cop department name computation. Cops inside deep namespaces (5 or more levels deep) now belong to departments with names that are calculated by joining module names starting from the third one with slashes as separators. For example, cop `Rubocop::Cop::Foo::Bar::Baz` now belongs to `Foo/Bar` department (previously it was `Bar`).
17
+ - `RegexpNode#parsed_tree` now processes regexps including interpolation (by blanking the interpolation before parsing, rather than skipping).
18
+ - Cop `Metrics/AbcSize` now counts ||=, &&=, multiple assignments, for, yield, iterating blocks. `&.` now count as conditions too (unless repeated on the same variable). Default bumped from 15 to 17. Consider using `rubocop -a --disable-uncorrectable` to ease transition.
19
+ - Cop `Metrics/PerceivedComplexity` now counts `else` in `case` statements, `&.`, `||=`, `&&=` and blocks known to iterate. Default bumped from 7 to 8. Consider using `rubocop -a --disable-uncorrectable` to ease transition.
20
+ - Extensive refactoring of internal classes `Team`, `Commissioner`, `Corrector`. `Cop::Cop#corrections` not completely compatible. See Upgrade Notes.
21
+ - `rubocop -a / --autocorrect` no longer run unsafe corrections; `rubocop -A / --autocorrect-all` run both safe and unsafe corrections. Options `--safe-autocorrect` is deprecated.
22
+ - Order for gems names now disregards underscores and dashes unless `ConsiderPunctuation` setting is set to `true`.
23
+ - Cop `Metrics/CyclomaticComplexity` now counts `&.`, `||=`, `&&=` and blocks known to iterate. Default bumped from 6 to 7. Consider using `rubocop -a --disable-uncorrectable` to ease transition.
24
+ - Remove support for unindent/active_support/powerpack from `Layout/HeredocIndentation`, so it only recommends using squiggy heredoc.
25
+ - Change the max line length of `Layout/LineLength` to 120 by default.
26
+ - Inspect all files given on command line unless `--only-recognized-file-types` is given.
27
+ - Enabling a cop overrides disabling its department.
28
+ - Renamed `Layout/Tab` cop to `Layout/IndentationStyle`.
29
+ - Drop support for Ruby 2.3.
30
+ - Drop support for ruby 2.4.
31
+ - Retire `RSpec/InvalidPredicateMatcher` cop.
32
+ - Enabled pending cop (`RSpec/StubbedMock`).
11
33
 
12
34
  ## v2.4.0
13
35
  - Fix `FeatureFlagActive` cop so that it allows feature flag names to be variables in addition to strings.
data/conf/rubocop.yml CHANGED
@@ -2,6 +2,7 @@ require: ezcater_rubocop
2
2
 
3
3
  AllCops:
4
4
  DisplayCopNames: true
5
+ NewCops: disable
5
6
 
6
7
  Layout/FirstHashElementIndentation:
7
8
  EnforcedStyle: consistent
@@ -48,6 +49,9 @@ Naming/MethodParameterName:
48
49
  - ex
49
50
  - id
50
51
 
52
+ Naming/VariableNumber:
53
+ Enabled: false
54
+
51
55
  Rails:
52
56
  Enabled: false
53
57
 
@@ -131,6 +135,9 @@ Style/StderrPuts:
131
135
  Exclude:
132
136
  - "bin/yarn"
133
137
 
138
+ Style/StringConcatenation:
139
+ Enabled: false
140
+
134
141
  Style/StringLiterals:
135
142
  EnforcedStyle: double_quotes
136
143
 
@@ -146,6 +153,184 @@ Style/TrailingCommaInHashLiteral:
146
153
  # enabled or disabled. New cops are not enabled by default until the
147
154
  # next major release.
148
155
 
156
+ # New cops introduced between 0.81.0 and 1.16.0
157
+ Layout/BeginEndAlignment:
158
+ Enabled: false
159
+
160
+ Layout/EmptyLinesAroundAttributeAccessor:
161
+ Enabled: false
162
+
163
+ Layout/IndentationStyle:
164
+ Enabled: false
165
+
166
+ Layout/SpaceAroundMethodCallOperator:
167
+ Enabled: false
168
+
169
+ Lint/BinaryOperatorWithIdenticalOperands:
170
+ Enabled: false
171
+
172
+ Lint/ConstantDefinitionInBlock:
173
+ Enabled: false
174
+
175
+ Lint/DeprecatedOpenSSLConstant:
176
+ Enabled: false
177
+
178
+ Lint/DuplicateElsifCondition:
179
+ Enabled: false
180
+
181
+ Lint/DuplicateRequire:
182
+ Enabled: false
183
+
184
+ Lint/DuplicateRescueException:
185
+ Enabled: false
186
+
187
+ Lint/EmptyConditionalBody:
188
+ Enabled: false
189
+
190
+ Lint/EmptyFile:
191
+ Enabled: false
192
+
193
+ Lint/FloatComparison:
194
+ Enabled: false
195
+
196
+ Lint/HashCompareByIdentity:
197
+ Enabled: false
198
+
199
+ Lint/IdentityComparison:
200
+ Enabled: false
201
+
202
+ Lint/MissingSuper:
203
+ Enabled: false
204
+
205
+ Lint/MixedRegexpCaptureTypes:
206
+ Enabled: false
207
+
208
+ Lint/OutOfRangeRegexpRef:
209
+ Enabled: false
210
+
211
+ Lint/RedundantSafeNavigation:
212
+ Enabled: false
213
+
214
+ Lint/SelfAssignment:
215
+ Enabled: false
216
+
217
+ Lint/TopLevelReturnWithArgument:
218
+ Enabled: false
219
+
220
+ Lint/TrailingCommaInAttributeDeclaration:
221
+ Enabled: false
222
+
223
+ Lint/UnreachableLoop:
224
+ Enabled: false
225
+
226
+ Lint/UselessMethodDefinition:
227
+ Enabled: false
228
+
229
+ Lint/UselessTimes:
230
+ Enabled: false
231
+
232
+ Rails/ArelStar:
233
+ Enabled: false
234
+
235
+ Rails/Pick:
236
+ Enabled: false
237
+
238
+ Rails/RedundantForeignKey:
239
+ Enabled: false
240
+
241
+ RSpec/Capybara/CurrentPathExpectation:
242
+ Enabled: false
243
+
244
+ RSpec/Capybara/FeatureMethods:
245
+ Enabled: false
246
+
247
+ RSpec/Capybara/VisibilityMatcher:
248
+ Enabled: false
249
+
250
+ RSpec/EmptyHook:
251
+ Enabled: false
252
+
253
+ RSpec/FactoryBot/AttributeDefinedStatically:
254
+ Enabled: false
255
+
256
+ RSpec/FactoryBot/CreateList:
257
+ Enabled: false
258
+
259
+ RSpec/FactoryBot/FactoryClassName:
260
+ Enabled: false
261
+
262
+ RSpec/MultipleMemoizedHelpers:
263
+ Enabled: false
264
+
265
+ RSpec/NotToNot:
266
+ Enabled: false
267
+
268
+ RSpec/Rails/HttpStatus:
269
+ Enabled: false
270
+
271
+ RSpec/RepeatedIncludeExample:
272
+ Enabled: false
273
+
274
+ RSpec/StubbedMock:
275
+ Enabled: false
276
+
277
+ RSpec/VariableDefinition:
278
+ Enabled: false
279
+
280
+ RSpec/VariableName:
281
+ Enabled: false
282
+
283
+ Style/AccessorGrouping:
284
+ Enabled: false
285
+
286
+ Style/BisectedAttrAccessor:
287
+ Enabled: false
288
+
289
+ Style/CaseLikeIf:
290
+ Enabled: false
291
+
292
+ Style/CombinableLoops:
293
+ Enabled: false
294
+
295
+ Style/ExponentialNotation:
296
+ Enabled: false
297
+
298
+ Style/GlobalStdStream:
299
+ Enabled: false
300
+
301
+ Style/HashAsLastArrayItem:
302
+ Enabled: false
303
+
304
+ Style/HashLikeCase:
305
+ Enabled: false
306
+
307
+ Style/KeywordParametersOrder:
308
+ Enabled: false
309
+
310
+ Style/OptionalBooleanParameter:
311
+ Enabled: false
312
+
313
+ Style/RedundantAssignment:
314
+ Enabled: false
315
+
316
+ Style/RedundantRegexpCharacterClass:
317
+ Enabled: false
318
+
319
+ Style/RedundantRegexpEscape:
320
+ Enabled: false
321
+
322
+ Style/RedundantSelfAssignment:
323
+ Enabled: false
324
+
325
+ Style/SingleArgumentDig:
326
+ Enabled: false
327
+
328
+ Style/SlicingWithRange:
329
+ Enabled: false
330
+
331
+ Style/SoleNestedConditional:
332
+ Enabled: false
333
+
149
334
  #### New cops in v0.81
150
335
 
151
336
  Lint/RaiseException:
@@ -52,7 +52,7 @@ Gem::Specification.new do |spec|
52
52
  spec.add_development_dependency "simplecov", "< 0.18.0"
53
53
 
54
54
  spec.add_runtime_dependency "parser", "!= 2.5.1.1"
55
- spec.add_runtime_dependency "rubocop", "~> 0.90.0"
56
- spec.add_runtime_dependency "rubocop-rails", "~> 2.5.2"
57
- spec.add_runtime_dependency "rubocop-rspec", "~> 1.38.1"
55
+ spec.add_runtime_dependency "rubocop", "~> 1.16.0"
56
+ spec.add_runtime_dependency "rubocop-rails", "~> 2.10.1"
57
+ spec.add_runtime_dependency "rubocop-rspec", "~> 2.3.0"
58
58
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EzcaterRubocop
4
- VERSION = "2.5.0"
4
+ VERSION = "3.0.0"
5
5
  end
@@ -40,7 +40,7 @@ module RuboCop
40
40
 
41
41
  return if includes_camelize?(node)
42
42
 
43
- check_name(node, first_arg.value, node.first_argument.loc.expression)
43
+ check_name(node, first_arg.value, node.first_argument)
44
44
  end
45
45
 
46
46
  alias on_super on_send
@@ -24,18 +24,16 @@ module RuboCop
24
24
  # end
25
25
 
26
26
  class RspecDotNotSelfDot < Cop
27
+ include RuboCop::RSpec::Language
28
+
27
29
  SELF_DOT_REGEXP = /["']self\./.freeze
28
30
  COLON_COLON_REGEXP = /["'](\:\:)/.freeze
29
31
 
30
32
  SELF_DOT_MSG = 'Use ".<class method>" instead of "self.<class method>" for example group description.'
31
33
  COLON_COLON_MSG = 'Use ".<class method>" instead of "::<class method>" for example group description.'
32
34
 
33
- def_node_matcher :example_group_match, <<-PATTERN
34
- (send _ #{RuboCop::RSpec::Language::ExampleGroups::ALL.node_pattern_union} $_ ...)
35
- PATTERN
36
-
37
35
  def on_send(node)
38
- example_group_match(node) do |doc|
36
+ example_group?(node) do |doc|
39
37
  if doc.source.match?(SELF_DOT_REGEXP)
40
38
  add_offense(doc, location: :expression, message: SELF_DOT_MSG)
41
39
  elsif doc.source.match?(COLON_COLON_REGEXP)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezcater_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezCater, Inc
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,42 +114,42 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.90.0
117
+ version: 1.16.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.90.0
124
+ version: 1.16.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop-rails
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 2.5.2
131
+ version: 2.10.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 2.5.2
138
+ version: 2.10.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.38.1
145
+ version: 2.3.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.38.1
152
+ version: 2.3.0
153
153
  description: ezCater custom cops and shared configuration
154
154
  email:
155
155
  - engineering@ezcater.com
@@ -192,7 +192,7 @@ licenses:
192
192
  - MIT
193
193
  metadata:
194
194
  allowed_push_host: https://rubygems.org
195
- post_install_message:
195
+ post_install_message:
196
196
  rdoc_options: []
197
197
  require_paths:
198
198
  - lib
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  requirements: []
210
210
  rubygems_version: 3.1.6
211
- signing_key:
211
+ signing_key:
212
212
  specification_version: 4
213
213
  summary: ezCater custom cops and shared configuration
214
214
  test_files: []