rubocop-graphql 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubocop/cop/graphql/unused_argument.rb +7 -4
- data/lib/rubocop/graphql/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: d8c5edb3e37ffc8245916608bb37f79dc28afb39dde464477e5b31e7f92aef59
|
4
|
+
data.tar.gz: 3fc868fb4e1ee8cdb0fed44c35ae98899e83eb605e0618faba161f65344554b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96f21cb69d2a7fc4c5c084e4859756fc7f525fc29e5c7c2dd4bf5fb1233d039ff3932d5783cdd10f91b0cee15c5cc8c91e94e3fec2f07ee0d09fdbc4b32e2799
|
7
|
+
data.tar.gz: c88d409a7c67630c3f68d98fb6d78418be4c3c99d601470f9732ed456b4ee86f3f2439323c019b82eaa52f2b613aa01fdf14cc195304eb3fc0a7c6bb3bec6774
|
@@ -67,10 +67,7 @@ module RuboCop
|
|
67
67
|
|
68
68
|
def on_class(node)
|
69
69
|
resolve_method_node = find_resolve_method_node(node)
|
70
|
-
return if resolve_method_node.nil? ||
|
71
|
-
resolve_method_node.arguments.any? do |arg|
|
72
|
-
arg.arg_type? || arg.kwrestarg_type?
|
73
|
-
end
|
70
|
+
return if resolve_method_node.nil? || ignore_arguments_type?(resolve_method_node)
|
74
71
|
|
75
72
|
declared_arg_nodes = find_declared_arg_nodes(node)
|
76
73
|
return unless declared_arg_nodes.any?
|
@@ -109,6 +106,12 @@ module RuboCop
|
|
109
106
|
end
|
110
107
|
end
|
111
108
|
|
109
|
+
def ignore_arguments_type?(resolve_method_node)
|
110
|
+
resolve_method_node.arguments.any? do |arg|
|
111
|
+
arg.arg_type? || arg.kwrestarg_type? || arg.forward_arg_type?
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
112
115
|
def register_offense(node, unresolved_args)
|
113
116
|
unresolved_args_source = unresolved_args.map { |v| "#{v}:" }.join(", ")
|
114
117
|
|
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.14.
|
4
|
+
version: 0.14.2
|
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-03-
|
11
|
+
date: 2022-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|