rubocop-rbs_inline 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8008a16d537a1c97bc627ada003d8b6cb5cf106816d0bdcd7ecb7c49255e941
|
4
|
+
data.tar.gz: 2597b7e5e77c085c887ec295de883451661752847d4e24a2d618625c5abaf341
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b3de5f3348d0a4fd045f4258e7f278832d581cca1404b0ab3196b2a608e3fdb1c3fde594f4d7619b9284846e8f608ba2248c0ac50b7cbd893655263bfb4e1b
|
7
|
+
data.tar.gz: 191da5351ce4d508b7ddc00c00b09b8944005aaf73aa1072bd03d85de6a3d411b9c84eb838161f0e88354a7c796da4027ee218c22b7ed887606de6d2874c6150
|
@@ -23,10 +23,11 @@ module RuboCop
|
|
23
23
|
class InvalidTypes < Base
|
24
24
|
include RangeHelp
|
25
25
|
include RBS::Inline::AST::Annotations
|
26
|
+
include RBS::Inline::AST::Members
|
26
27
|
|
27
28
|
MSG = 'Invalid annotation found.'
|
28
29
|
|
29
|
-
def on_new_investigation #: void # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
30
|
+
def on_new_investigation #: void # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
|
30
31
|
results = parse_comments
|
31
32
|
results.each do |result|
|
32
33
|
result.each_annotation do |annotation|
|
@@ -44,6 +45,11 @@ module RuboCop
|
|
44
45
|
add_offense(range) if annotation.self_types.empty?
|
45
46
|
when SyntaxErrorAssertion
|
46
47
|
add_offense(range)
|
48
|
+
when Embedded
|
49
|
+
comment = annotation.source.comments.fetch(0)
|
50
|
+
parsing_result = RBS::Inline::AnnotationParser::ParsingResult.new(comment)
|
51
|
+
embedded = RBSEmbedded.new(parsing_result, annotation)
|
52
|
+
add_offense(range) if embedded.members.is_a?(RBS::ParsingError)
|
47
53
|
end
|
48
54
|
end
|
49
55
|
end
|
data/rbs_collection.lock.yaml
CHANGED
@@ -6,7 +6,7 @@ gems:
|
|
6
6
|
source:
|
7
7
|
type: git
|
8
8
|
name: ruby/gem_rbs_collection
|
9
|
-
revision:
|
9
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
11
|
repo_dir: gems
|
12
12
|
- name: dbm
|
@@ -18,7 +18,7 @@ gems:
|
|
18
18
|
source:
|
19
19
|
type: git
|
20
20
|
name: ruby/gem_rbs_collection
|
21
|
-
revision:
|
21
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
22
22
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
23
23
|
repo_dir: gems
|
24
24
|
- name: fileutils
|
@@ -46,7 +46,7 @@ gems:
|
|
46
46
|
source:
|
47
47
|
type: git
|
48
48
|
name: ruby/gem_rbs_collection
|
49
|
-
revision:
|
49
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
50
50
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
51
51
|
repo_dir: gems
|
52
52
|
- name: parser
|
@@ -54,7 +54,7 @@ gems:
|
|
54
54
|
source:
|
55
55
|
type: git
|
56
56
|
name: ruby/gem_rbs_collection
|
57
|
-
revision:
|
57
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
58
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
59
59
|
repo_dir: gems
|
60
60
|
- name: pathname
|
@@ -78,7 +78,7 @@ gems:
|
|
78
78
|
source:
|
79
79
|
type: git
|
80
80
|
name: ruby/gem_rbs_collection
|
81
|
-
revision:
|
81
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
82
82
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
83
83
|
repo_dir: gems
|
84
84
|
- name: rake
|
@@ -86,7 +86,7 @@ gems:
|
|
86
86
|
source:
|
87
87
|
type: git
|
88
88
|
name: ruby/gem_rbs_collection
|
89
|
-
revision:
|
89
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
90
90
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
91
91
|
repo_dir: gems
|
92
92
|
- name: rbs
|
@@ -106,7 +106,7 @@ gems:
|
|
106
106
|
source:
|
107
107
|
type: git
|
108
108
|
name: ruby/gem_rbs_collection
|
109
|
-
revision:
|
109
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
110
110
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
111
111
|
repo_dir: gems
|
112
112
|
- name: rubocop
|
@@ -114,7 +114,7 @@ gems:
|
|
114
114
|
source:
|
115
115
|
type: git
|
116
116
|
name: ruby/gem_rbs_collection
|
117
|
-
revision:
|
117
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
118
118
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
119
119
|
repo_dir: gems
|
120
120
|
- name: rubocop-ast
|
@@ -122,7 +122,7 @@ gems:
|
|
122
122
|
source:
|
123
123
|
type: git
|
124
124
|
name: ruby/gem_rbs_collection
|
125
|
-
revision:
|
125
|
+
revision: 218cf130d31f63e110e350efc3fa265311b0f238
|
126
126
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
127
127
|
repo_dir: gems
|
128
128
|
- name: strscan
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rbs_inline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi KOMIYA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs-inline
|