rubocop-socketry 0.2.1 → 0.2.2

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: 7054dc76500e02a8df56ff00b5d847396cf4622119b7eca147f7eec162ec7b93
4
- data.tar.gz: 7e50277305f240048445e71e087948c3e1c9f0f7a8c5bd85b8700348c47fa88d
3
+ metadata.gz: 1cd24ac3f11cf5e4b0fc32f54ca985578963b64ea7ccdf9d148996b75e0df68f
4
+ data.tar.gz: 57ca52a7c26e6f4b029b928ad0b6d5cae1dfab8e8c4105ebd084be7fe1a9732b
5
5
  SHA512:
6
- metadata.gz: 57d9906646551e6803b2a57b1f00d7b85c46b09dd6fff0da0daae38ae6ac41213f6c0ba6281bfcc65a8e0234b541833ad33cacc32b7d13e9a04f03a7c3b5e438
7
- data.tar.gz: bdc2fb54732ed2ca0af31a0d7a1dcdf0756830198423cdddd3fe2cb57c93a42519c2e3690d821a6062f750d0dcdf88d57e80dc5aea63c0d302ac8b14b5f606fb
6
+ metadata.gz: '059d5dd3fc0e62510c4966ea018c4ef15d4e8fd54827895441899c47ca38a4d408e9ef39795112f2c913f0af9012172a0339c3ac42de58f1273ca77e4762161a'
7
+ data.tar.gz: dd8b19f094ace1a5891d14877331d9eda98e45a08e326b2d1b87e96696987067bd369852d2887a4e4d4a1c63c38f549ed2d4e07899607da04e373ae924682465
checksums.yaml.gz.sig CHANGED
Binary file
@@ -94,14 +94,15 @@ module RuboCop
94
94
  return false unless send_node.type == :send
95
95
 
96
96
  if receiver = send_node.children.first
97
- return receiver.type != :send
97
+ # Only structural node types handle their own indentation.
98
+ # These are nodes that create indentation contexts (arrays, hashes, classes, etc.)
99
+ # All other receivers (simple references, method calls, literals) should allow block indentation.
100
+ return [:array, :hash, :class, :module, :sclass, :def, :defs, :if, :while, :until, :for, :case, :kwbegin].include?(receiver.type)
98
101
  end
99
102
  end
100
103
 
101
104
  return false
102
- end
103
-
104
- # Recursively walk the AST to build indentation deltas for block structures.
105
+ end # Recursively walk the AST to build indentation deltas for block structures.
105
106
  # This method identifies nodes that should affect indentation and records the deltas.
106
107
  # @parameter node [Parser::AST::Node] The current AST node to process.
107
108
  # @parameter deltas [Hash(Integer, Integer)] The deltas hash to populate.
@@ -118,7 +119,7 @@ module RuboCop
118
119
  deltas[location.last_line] -= 1
119
120
  end
120
121
  end
121
- when :hash, :array, :class, :module, :sclass, :def, :defs, :case, :while, :until, :for, :kwbegin
122
+ when :array, :hash, :class, :module, :sclass, :def, :defs, :while, :until, :for, :case, :kwbegin
122
123
  if location = node.location
123
124
  deltas[location.line] += 1
124
125
  deltas[location.last_line] -= 1
@@ -5,6 +5,6 @@
5
5
 
6
6
  module RuboCop
7
7
  module Socketry
8
- VERSION = "0.2.1"
8
+ VERSION = "0.2.2"
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file