rubocop-graphql 0.7.0 → 0.8.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: 99b9cc340e883dfe2dd4d0662a04383fde0a0b648cd1716f8aaec8eef8aab486
4
- data.tar.gz: 928eee0593772d1614c6527ebefeb11753b3797408a98bdd84ae6c6fa46ca8da
3
+ metadata.gz: c68112dd907111859f0c8ca78ad31c6bea918c11411d9d89a4a4ae289fc3630d
4
+ data.tar.gz: cfeed828552dcdc4509b476f4d6a9672c111ef2e11001fad01f52b3699d26bc9
5
5
  SHA512:
6
- metadata.gz: 736f86f09bc7123fd0c5227ce35f771a83d75532d9231becd4a444b725fbddac7494fadcbffe929ddfcb0609e6ff80d53510d379792141e12d5d7c3fb08f4056
7
- data.tar.gz: 2603c7d27cccd23e904c9345b9b1728a16bf99a1c03162ff93281a0a64f7f1621f5f8ad874af950671275be4a8f743dbbae71e8439d0f369b8ae4c9b5586e26e
6
+ metadata.gz: 7a20bb455185e7eb0ceeffb6da3f33438a416f003ce6fd7287483a34aab61301051a72e0b6b13967ead0c2b14c5ce31d28f4c9c864ed24ab627b34e7f322e40c
7
+ data.tar.gz: e3badf19ec0a0ec03fe7be4d71324cb65e70f64c2ed3919334836f5d532e10fd16b3f54f58f2e909c987b72957027a13fa27fedf35f1bba2d2cceb6c9e66ca69
@@ -32,7 +32,12 @@ module RuboCop
32
32
  if (body = schema_member.body)
33
33
  arguments = body.select { |node| argument?(node) }
34
34
 
35
- add_offense(arguments.last) if arguments.count > cop_config["MaxArguments"]
35
+ excess_arguments = arguments.count - cop_config["MaxArguments"]
36
+ return unless excess_arguments.positive?
37
+
38
+ arguments.last(excess_arguments).each do |excess_argument|
39
+ add_offense(excess_argument)
40
+ end
36
41
  end
37
42
  end
38
43
  end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module GraphQL
3
- VERSION = "0.7.0".freeze
3
+ VERSION = "0.8.0".freeze
4
4
  end
5
5
  end
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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Tsepelev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-17 00:00:00.000000000 Z
11
+ date: 2021-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler