rubocop-nri 1.0.0 → 2.0.0
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 +7 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81929cb1633e90ae96153d235358ddaf8b5f5063
|
4
|
+
data.tar.gz: dde23b701abc8245320a723a617f197fffbbb5b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab297a15725ccdf36b7d9f4b885c10f7ca4b000dc94dc70bcc6984e9780c066df0b81fe973774f65d54a28a6e69859130c789d976148b4d74a745e5fafb58b34
|
7
|
+
data.tar.gz: 95569036879aa98a5259b75a79e1fecb986f3b89b70f06601f13190b13aad3d305d62128f6d6c61c5fdc4c939312874da78d281a53feb3b0ecd5cb0fe0e737cb
|
@@ -8,8 +8,12 @@ module RuboCop
|
|
8
8
|
class MoreRollbarInformation < Cop
|
9
9
|
MSG = 'Must include advisory and impact as keyword arguments.'
|
10
10
|
|
11
|
+
def_node_matcher :missing_hash?, <<-PATTERN
|
12
|
+
(send (const nil :Rollbar) {:critical :error} ...)
|
13
|
+
PATTERN
|
14
|
+
|
11
15
|
def_node_matcher :missing_fields?, <<-PATTERN
|
12
|
-
|
16
|
+
(send (const nil :Rollbar) {:critical :error} ... (hash $...))
|
13
17
|
PATTERN
|
14
18
|
|
15
19
|
def_node_matcher :advisory?, <<-PATTERN
|
@@ -21,6 +25,8 @@ module RuboCop
|
|
21
25
|
PATTERN
|
22
26
|
|
23
27
|
def on_send(node)
|
28
|
+
add_offense(node, :expression) if missing_hash?(node)
|
29
|
+
|
24
30
|
missing_fields?(node) do |pairs|
|
25
31
|
add_offense(node, :expression) unless all_fields?(pairs)
|
26
32
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hardy Jones
|
@@ -28,16 +28,30 @@ dependencies:
|
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '9.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '9.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '3.6'
|
41
55
|
description: Cops we use internally at NoRedInk
|
42
56
|
email: engineering@noredink.com
|
43
57
|
executables: []
|