rubocop-socketry 0.1.2 → 0.1.4

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: bd9a6a737fa0bd9a1c5a345b97f80a3c5f7446989637a009d60dc75f2a8c8d27
4
- data.tar.gz: 3b09366eebd423d6e6f7415d37f5611f1f9c150e4cc14bf10d0ef7ef7ba309d5
3
+ metadata.gz: 726a243627d25f8f76dc549f59278267787272cf69796f60d7287832dc62d5db
4
+ data.tar.gz: a29ea75820682a9c02de65b587208dce15034ac951d5c8ed0a247ef1b70fd74d
5
5
  SHA512:
6
- metadata.gz: d730ded733718d3b8f467fd44f914178bc1ddb56d99527e1166e52264e58ff6ee2fd1918461a9e80dcd34efa0de6e099530706a4cc69bb2e1cd36041fd25695d
7
- data.tar.gz: 44fd9c7673c2bac0e3ded94eb219dc5a707edc2e7fe89bba51e5a8d491c5f45558eff2837941eb3f86fd4ed406bced0057a8a3a35bd4dfba998b4bd7a22a477a
6
+ metadata.gz: b81fce2ec333469ac9958d677de1e0d9f406ea3c325b910485b5614f5d647c3ed809f176a1cb491464e8c0bdd4199a1ae4cd7b6110bf08c6602bb4020ebe9992
7
+ data.tar.gz: f483f8ecf7b635d9dbabcb52dc26e1104d3a766bf047fc13583ed8d032c002aa4f5df43a1e498bf98df282346ab35db827baf99ebccedaada372f296970dd32f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -97,14 +97,23 @@ module RuboCop
97
97
  return unless node.is_a?(Parser::AST::Node)
98
98
 
99
99
  case node.type
100
- when :block, :hash, :array, :class, :module, :sclass, :def, :defs, :if, :case, :while, :until, :for, :kwbegin
100
+ when :block, :hash, :array, :class, :module, :sclass, :def, :defs, :case, :while, :until, :for, :kwbegin
101
+
101
102
  if location = node.location
102
103
  deltas[location.line] += 1
103
104
  deltas[location.last_line] -= 1
104
105
  end
106
+ when :if
107
+ # We don't want to add deltas for elsif, because it's handled by the if node:
108
+ if node.keyword == "if"
109
+ if location = node.location
110
+ deltas[location.line] += 1
111
+ deltas[location.last_line] -= 1
112
+ end
113
+ end
105
114
  when :dstr
106
115
  if location = node.location
107
- if body = location.heredoc_body
116
+ if location.is_a?(Parser::Source::Map::Heredoc) and body = location.heredoc_body
108
117
  if location.expression.source.start_with?("<<~")
109
118
  # Squiggly heredoc - indentation is significant, add deltas
110
119
  deltas[body.line] += 1
@@ -5,6 +5,6 @@
5
5
 
6
6
  module RuboCop
7
7
  module Socketry
8
- VERSION = "0.1.2"
8
+ VERSION = "0.1.4"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-socketry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file