rubocop-on-rbs 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rubocop/cop/rbs/lint/useless_overload_type_params.rb +12 -4
- data/lib/rubocop/rbs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d260d64881cb68a460632386ff5707ab99717fd56b2ac7ff1824a1cbc55680e
|
4
|
+
data.tar.gz: 353ef7d2b3b583d65880995d4eac7e72cca2f591953a747a826a2c0e55152601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77a462af68842c31f3cea245770215819515062faeaf24b6ef5f2d9c87ba0544dbf07f9cd6abc728955d4a67b77fa595baaad3e92c2f3fa7bfb780954a9018b
|
7
|
+
data.tar.gz: 496f22af11da44e34c72c558738a86f1eda45c3afeba5b629d893cf2be6f665b3f477bc8189e32d78e49d5da49e2ce868ce6ab87f4b2652fc4e80fca71764dc4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.7.0] - 2024-06-27
|
4
|
+
|
5
|
+
* Add RBS/Lint/AmbiguousOperatorPrecedence by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/22
|
6
|
+
* Add RBS/Lint/UselessAccessModifier by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/23
|
7
|
+
|
3
8
|
## [0.6.0] - 2024-06-18
|
4
9
|
|
5
10
|
* Fixed problems interfering with other Cop by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/20
|
@@ -20,19 +20,27 @@ module RuboCop
|
|
20
20
|
next if overload.method_type.type_params.empty?
|
21
21
|
|
22
22
|
type_params = overload.method_type.type_params.dup
|
23
|
+
map = type_params.to_h { |param| [param.name, param] }
|
24
|
+
type_params.each do |type_param|
|
25
|
+
if type_param.upper_bound
|
26
|
+
used_variable_in_type(type_param.upper_bound) do |var|
|
27
|
+
map.delete(var.name)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
23
31
|
|
24
32
|
overload.method_type.each_type do |type|
|
25
33
|
used_variable_in_type(type) do |var|
|
26
|
-
|
34
|
+
map.delete(var.name)
|
27
35
|
end
|
28
36
|
end
|
29
|
-
next if
|
37
|
+
next if map.empty?
|
30
38
|
|
31
|
-
|
39
|
+
map.each do |name, type_param|
|
32
40
|
next unless type_param.location
|
33
41
|
|
34
42
|
t = location_to_range(type_param.location[:name])
|
35
|
-
add_offense(t, message: format(MSG, variable:
|
43
|
+
add_offense(t, message: format(MSG, variable: name))
|
36
44
|
end
|
37
45
|
end
|
38
46
|
end
|
data/lib/rubocop/rbs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-on-rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06
|
11
|
+
date: 2024-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
rubygems_version: 3.5.
|
125
|
+
rubygems_version: 3.5.11
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: RuboCop extension for RBS file.
|