rubocop-nri 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 81929cb1633e90ae96153d235358ddaf8b5f5063
4
- data.tar.gz: dde23b701abc8245320a723a617f197fffbbb5b8
3
+ metadata.gz: '089c295b1af3a550c79ed834d95ae5a95cd3a353'
4
+ data.tar.gz: d233818aa07749772480c24cc36c401b42cac860
5
5
  SHA512:
6
- metadata.gz: ab297a15725ccdf36b7d9f4b885c10f7ca4b000dc94dc70bcc6984e9780c066df0b81fe973774f65d54a28a6e69859130c789d976148b4d74a745e5fafb58b34
7
- data.tar.gz: 95569036879aa98a5259b75a79e1fecb986f3b89b70f06601f13190b13aad3d305d62128f6d6c61c5fdc4c939312874da78d281a53feb3b0ecd5cb0fe0e737cb
6
+ metadata.gz: d25c5b46d675a33c4c73cd61cfd3e436fb432494ee8f076e63f136382a7e293e2511b43b0dfa68d0fc42bceabeab72332f4739e4feccdd73879b7d69c75371a2
7
+ data.tar.gz: 4afec51ab6fb1901ecfc1d82d230d07725e271bd2a97d3fed4ab74c72ffcd3661927a91df7b3a0e986b21d58ab377825c953d33e16b9f4de82d8725ba3c054f1
@@ -9,10 +9,13 @@ module RuboCop
9
9
  MSG = 'Must include advisory and impact as keyword arguments.'
10
10
 
11
11
  def_node_matcher :missing_hash?, <<-PATTERN
12
- (send (const nil :Rollbar) {:critical :error} ...)
12
+ {
13
+ (send (const nil :Rollbar) {:critical :error})
14
+ (send (const nil :Rollbar) {:critical :error} ... !(hash ...))
15
+ }
13
16
  PATTERN
14
17
 
15
- def_node_matcher :missing_fields?, <<-PATTERN
18
+ def_node_matcher :has_hash?, <<-PATTERN
16
19
  (send (const nil :Rollbar) {:critical :error} ... (hash $...))
17
20
  PATTERN
18
21
 
@@ -27,7 +30,7 @@ module RuboCop
27
30
  def on_send(node)
28
31
  add_offense(node, :expression) if missing_hash?(node)
29
32
 
30
- missing_fields?(node) do |pairs|
33
+ has_hash?(node) do |pairs|
31
34
  add_offense(node, :expression) unless all_fields?(pairs)
32
35
  end
33
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-nri
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hardy Jones