deadlyzer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deadlyzer/analyzer.rb +8 -2
- data/lib/deadlyzer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 251fc74dfdaa424427f934cf90ee3d2893af33c3844f3f1ebec38a109e145d68
|
4
|
+
data.tar.gz: 4d38ba28b5ce300b6514aa9e2f38d71c5ddf769521d281eabe5041c9c2c054ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 813db60466c851199829a0e9dd5cf22e8872118afb33a23dbf0dcccb2cd0be8e7d2dd7ca8c7250052c1c030f2037ebc0d7057fd368d07fb89ab696f37db7d1a4
|
7
|
+
data.tar.gz: 403530200ae21e8a593c03dd6fa30d86a92618ddaa2e86f97da65259ee6e8bfd8718c31be526169acf4b77dc9925ae901b6ab714347ade5aa56cc8df316f0687
|
data/lib/deadlyzer/analyzer.rb
CHANGED
@@ -130,11 +130,17 @@ module Deadlyzer
|
|
130
130
|
tc.name if against.any? {|ac| ac.name == tc.name}
|
131
131
|
end
|
132
132
|
|
133
|
-
constants = (used_constants + target).group_by
|
133
|
+
constants = (used_constants + target).group_by{|c| c if c.name}.transform_values(&:count)
|
134
134
|
constants.each do |constant, count|
|
135
|
-
constants_may_not_used.push constant if count <
|
135
|
+
constants_may_not_used.push constant if count < match_count
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
+
# @api private
|
140
|
+
# @since 0.1.1
|
141
|
+
def match_count
|
142
|
+
config.min_match_count || 2
|
143
|
+
end
|
144
|
+
|
139
145
|
end
|
140
146
|
end
|
data/lib/deadlyzer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deadlyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Farhad
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|