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 +4 -4
- data/lib/rubocop/cop/nri/more_rollbar_information.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '089c295b1af3a550c79ed834d95ae5a95cd3a353'
|
4
|
+
data.tar.gz: d233818aa07749772480c24cc36c401b42cac860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 :
|
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
|
-
|
33
|
+
has_hash?(node) do |pairs|
|
31
34
|
add_offense(node, :expression) unless all_fields?(pairs)
|
32
35
|
end
|
33
36
|
end
|