rubocop-graphql 0.12.2 → 0.12.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0b5a6defb854d907bf12c23a7262adc13b55228e3d7cf345f19ea7b1371bacb
|
4
|
+
data.tar.gz: 3250274062d10447eb23994e4bc1e99393d4d03a6b17221cdbda5f1d1bd4b2d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f59543ad00f27cf92048d5fa3fb7e09ea99c9e1179839f848316025eb48d66a92012f2cdb13847113d602b740a49aab128d8a4538cf5d8c0f8ea8a2c0f47321
|
7
|
+
data.tar.gz: 2b5110aa616044c726f466c6e82a36af0cdad58d096c6359a97a91b3d0c6e023dd4e2ce96f8ecaf44638393bce6b2a4330fa2b3ff76b8c5ecc89d0b07ed6f5e4
|
@@ -72,7 +72,7 @@ module RuboCop
|
|
72
72
|
arg.arg_type? || arg.kwrestarg_type?
|
73
73
|
end
|
74
74
|
|
75
|
-
declared_arg_nodes =
|
75
|
+
declared_arg_nodes = find_declared_arg_nodes(node)
|
76
76
|
return unless declared_arg_nodes.any?
|
77
77
|
|
78
78
|
unresolved_args = find_unresolved_args(resolve_method_node, declared_arg_nodes)
|
@@ -81,6 +81,13 @@ module RuboCop
|
|
81
81
|
|
82
82
|
private
|
83
83
|
|
84
|
+
def find_declared_arg_nodes(node)
|
85
|
+
argument_declarations(node).select do |arg_declaration|
|
86
|
+
# argument is declared on the same class that is being analyzed
|
87
|
+
arg_declaration.each_ancestor(:class).first == node
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
84
91
|
def find_resolve_method_node(node)
|
85
92
|
resolve_method_nodes = resolve_method_definition(node)
|
86
93
|
resolve_method_nodes.to_a.last if resolve_method_nodes.any?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Tsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|