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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40c6c0d0946c8de00446f8952a2fc29eb58b1475
4
- data.tar.gz: 94a2e3171b53360d0cddc182932d9fc2ae54600e
3
+ metadata.gz: 81929cb1633e90ae96153d235358ddaf8b5f5063
4
+ data.tar.gz: dde23b701abc8245320a723a617f197fffbbb5b8
5
5
  SHA512:
6
- metadata.gz: b191c5c987d078e57eccb36cb7366cb18c603fc0e97218ba416c11c7fcd2bb293c27cca712d045e4740191162b4c2eec2987a02b31d9ad4b074cc35b0ff2196a
7
- data.tar.gz: 13d51f4abb5813014a83d2f5b9d5a5f5b7f020e2651a46962a394583ed95105473fefcced9a1c42a6fa37a3800f55158788f2665b635d5e4cc0e5e126736e613
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
- {(send (const nil :Rollbar) {:critical :error} ... (hash $...))}
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: 1.0.0
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: '0'
54
+ version: '3.6'
41
55
  description: Cops we use internally at NoRedInk
42
56
  email: engineering@noredink.com
43
57
  executables: []