reek 6.1.0 → 6.1.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: dbfc48f555eaab012cf855f620277247ab134517838fb4f36e608a7dce6c0f4c
4
- data.tar.gz: 75770e4ea054b9a1f6450d43dd9b3580492e0e7de39c194b95ca4400dc15c54f
3
+ metadata.gz: 2e1e79296b4eb0b93d7b6d7bc7b13704b6831765416cab19c729473d2fe135ea
4
+ data.tar.gz: f9a49ffd6ad47e308a617bafb0901d438617c863ff5279c867d5db8e9148c0e4
5
5
  SHA512:
6
- metadata.gz: ee11e3c7b674c7f520f329f2908f29b529d19671756f77c928e96b62b24e663528dbe7f2c33c669e59f9199cd1338b6e9c2071cf3d94984f1ae801efdabc0ef7
7
- data.tar.gz: 41d34fe50259bae6f50675ba14ae0205d1348d6ae1a9e2b7716f87ee8f4afa773df7af6853a77af4865cf95d90dfccc0fdcc666a372957b9ade5bb1565d9b34f
6
+ metadata.gz: 3ea8856c9c0f32543af3bb336790d9875cdf385ed45d2609af219f1857931d1b15de7802386954caff9c68f5753657f138e2eb304ef4ae94edc0e7a0e7e4e070
7
+ data.tar.gz: 407628086e04a8d2972f1343a34d299e77d462b0236f18e8b4570a9b9dfcd290dc6d690be56c67e06c0fff95326e764254b70c127962f5a90914a73bae115aed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 6.1.1 (2022-04-20)
4
+
5
+ * (ydah) UnusedPrivateMethod to be detect use of methods via `Method#to_proc`
6
+
3
7
  ## 6.1.0 (2022-01-14)
4
8
 
5
9
  * (mvz) Drop support for Ruby 2.4 and 2.5
data/Gemfile CHANGED
@@ -13,9 +13,9 @@ group :development do
13
13
  gem 'rake', '~> 13.0'
14
14
  gem 'rspec', '~> 3.0'
15
15
  gem 'rspec-benchmark', '~> 0.6.0'
16
- gem 'rubocop', '~> 1.24.0'
16
+ gem 'rubocop', '~> 1.27.0'
17
17
  gem 'rubocop-performance', '~> 1.13.1'
18
- gem 'rubocop-rspec', '~> 2.7.0'
18
+ gem 'rubocop-rspec', '~> 2.9.0'
19
19
  gem 'simplecov', ['>= 0.18.0', '< 0.22.0']
20
20
  gem 'yard', '~> 0.9.5'
21
21
 
@@ -55,6 +55,10 @@ module Reek
55
55
  end
56
56
  end
57
57
 
58
+ def instance_method_names_via_to_call
59
+ instance_method_calls.flat_map(&:method_name_called_to_call).compact
60
+ end
61
+
58
62
  #
59
63
  # @deprecated use `defined_instance_methods` instead
60
64
  #
@@ -14,6 +14,12 @@ module Reek
14
14
  @name = name
15
15
  super exp
16
16
  end
17
+
18
+ def method_name_called_to_call
19
+ return unless @name == :method
20
+
21
+ local_nodes(:sym).map(&:name)
22
+ end
17
23
  end
18
24
  end
19
25
  end
@@ -61,6 +61,7 @@ module Reek
61
61
  def unused_private_methods
62
62
  defined_private_methods = context.defined_instance_methods(visibility: :private)
63
63
  called_method_names = context.instance_method_calls.map(&:name)
64
+ called_method_names.concat(context.instance_method_names_via_to_call)
64
65
 
65
66
  defined_private_methods.reject do |defined_method|
66
67
  called_method_names.include?(defined_method.name)
data/lib/reek/version.rb CHANGED
@@ -8,6 +8,6 @@ module Reek
8
8
  # @public
9
9
  module Version
10
10
  # @public
11
- STRING = '6.1.0'
11
+ STRING = '6.1.1'
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rutherford
8
8
  - Timo Roessner
9
9
  - Matijs van Zuijlen
10
10
  - Piotr Szotkowski
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-01-14 00:00:00.000000000 Z
14
+ date: 2022-04-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: kwalify
@@ -244,7 +244,7 @@ metadata:
244
244
  changelog_uri: https://github.com/troessner/reek/CHANGELOG.md
245
245
  documentation_uri: https://www.rubydoc.info/gems/reek
246
246
  rubygems_mfa_required: 'true'
247
- post_install_message:
247
+ post_install_message:
248
248
  rdoc_options:
249
249
  - "--main"
250
250
  - README.md
@@ -263,8 +263,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
265
  requirements: []
266
- rubygems_version: 3.3.3
267
- signing_key:
266
+ rubygems_version: 3.1.6
267
+ signing_key:
268
268
  specification_version: 4
269
269
  summary: Code smell detector for Ruby
270
270
  test_files: []