rubocop-graphql 0.6.1 → 0.6.2
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: 2393f8c4972a479e9618f3ed9f846a819b0efa8bf13e53f319bbc176c50a470b
|
4
|
+
data.tar.gz: 4326de68922f560a042ecbee99f70f421a09c05e0502291e4b4624c90a369233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d65dbf3f6d5a623afbd74524e485ff4c570157ab23eae396e7ca5e343ff3ea2546d8433fc67dff38e2d63985ebc2881de3ba37e58ed5943ef2521fb2be93d36
|
7
|
+
data.tar.gz: 718957be35d17116319a4d18ba707b96236e813e9acd8fa724888623550f6dffafc2c07e774a181f5f576c2e949d92e3c264badc2c30ef4897d440781a3b1c32
|
@@ -12,7 +12,7 @@ module RuboCop
|
|
12
12
|
# class will invoke the inherited hook instead
|
13
13
|
class << self
|
14
14
|
undef inherited
|
15
|
-
def inherited(*); end
|
15
|
+
def inherited(*); end # rubocop:disable Lint/MissingSuper
|
16
16
|
end
|
17
17
|
|
18
18
|
# Special case `Module#<` so that the rspec support rubocop exports
|
@@ -47,7 +47,7 @@ module RuboCop
|
|
47
47
|
)
|
48
48
|
|
49
49
|
# Invoke the original inherited hook so our cops are recognized
|
50
|
-
def self.inherited(subclass)
|
50
|
+
def self.inherited(subclass) # rubocop:disable Lint/MissingSuper
|
51
51
|
RuboCop::Cop::Cop.inherited(subclass)
|
52
52
|
end
|
53
53
|
|
@@ -109,7 +109,7 @@ module RuboCop
|
|
109
109
|
field_definition?(node) || field_definition_with_body?(node)
|
110
110
|
end
|
111
111
|
|
112
|
-
source_to_insert = "\n
|
112
|
+
source_to_insert = "\n#{indent(node)}#{node.source}"
|
113
113
|
corrector.insert_after(first_field.loc.expression, source_to_insert)
|
114
114
|
|
115
115
|
range = range_with_surrounding_space(range: node.loc.expression, side: :left)
|
@@ -143,7 +143,7 @@ module RuboCop
|
|
143
143
|
|
144
144
|
field_definition = field_definition_with_body?(node.parent) ? node.parent : node
|
145
145
|
|
146
|
-
source_to_insert = indent(method_definition)
|
146
|
+
source_to_insert = "#{indent(method_definition)}#{field_definition.source}\n\n"
|
147
147
|
method_range = range_by_whole_lines(method_definition.loc.expression)
|
148
148
|
corrector.insert_before(method_range, source_to_insert)
|
149
149
|
|
@@ -33,6 +33,10 @@ module RuboCop
|
|
33
33
|
(send nil? :description (:str $_))
|
34
34
|
PATTERN
|
35
35
|
|
36
|
+
def_node_matcher :has_multiline_string_description?, <<~PATTERN
|
37
|
+
(send nil? :description (:dstr ...))
|
38
|
+
PATTERN
|
39
|
+
|
36
40
|
def_node_matcher :interface?, <<~PATTERN
|
37
41
|
(send nil? :include (const ...))
|
38
42
|
PATTERN
|
@@ -54,7 +58,9 @@ module RuboCop
|
|
54
58
|
private
|
55
59
|
|
56
60
|
def has_description?(node)
|
57
|
-
has_i18n_description?(node) ||
|
61
|
+
has_i18n_description?(node) ||
|
62
|
+
has_string_description?(node) ||
|
63
|
+
has_multiline_string_description?(node)
|
58
64
|
end
|
59
65
|
|
60
66
|
def child_nodes(node)
|
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.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Tsepelev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,7 +116,7 @@ metadata:
|
|
116
116
|
homepage_uri: https://github.com/DmitryTsepelev/rubocop-graphql
|
117
117
|
source_code_uri: https://github.com/DmitryTsepelev/rubocop-graphql
|
118
118
|
changelog_uri: https://github.com/DmitryTsepelev/rubocop-graphql/CHANGELOG.md
|
119
|
-
post_install_message:
|
119
|
+
post_install_message:
|
120
120
|
rdoc_options: []
|
121
121
|
require_paths:
|
122
122
|
- lib
|
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
135
|
-
signing_key:
|
134
|
+
rubygems_version: 3.1.2
|
135
|
+
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Automatic performance checking tool for Ruby code.
|
138
138
|
test_files: []
|