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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 615681c73d7e70b350f6b830050bfce38cac2fc5bca2d8f9d497c4cf93ad1864
4
- data.tar.gz: 88fdc3fd0a867edbf111c3b839da92d3e2b3289c290049f8d0eafc7c9f84c74f
3
+ metadata.gz: 4d260d64881cb68a460632386ff5707ab99717fd56b2ac7ff1824a1cbc55680e
4
+ data.tar.gz: 353ef7d2b3b583d65880995d4eac7e72cca2f591953a747a826a2c0e55152601
5
5
  SHA512:
6
- metadata.gz: b9265c984b3c0d4565cb55936a320a2f0f1f29bd7f7927a15f2507dbab41f90ac171aa5d5b31cfa3af32ab5591b4a4bd3fc44615b7f1b728fda8ace3cfdff03f
7
- data.tar.gz: fdefc26a752f70e15f6bc47b3246e1a4516e3f4ca6e36624701e69632cc38cfbee50a387717a0993cba265373351868c97e40e7149597bafe1d4095e374e31e2
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
- type_params.delete_if { |type_param| type_param.name == var.name }
34
+ map.delete(var.name)
27
35
  end
28
36
  end
29
- next if type_params.empty?
37
+ next if map.empty?
30
38
 
31
- type_params.each do |type_param|
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: type_param.name), severity: :warning)
43
+ add_offense(t, message: format(MSG, variable: name))
36
44
  end
37
45
  end
38
46
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RBS
5
- VERSION = '0.7.0'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
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.7.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-27 00:00:00.000000000 Z
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.9
125
+ rubygems_version: 3.5.11
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: RuboCop extension for RBS file.