rubocop 0.83.0 → 0.84.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/config/default.yml +20 -3
  4. data/lib/rubocop.rb +6 -59
  5. data/lib/rubocop/ast_aliases.rb +8 -0
  6. data/lib/rubocop/cli/command/show_cops.rb +2 -6
  7. data/lib/rubocop/config.rb +1 -3
  8. data/lib/rubocop/config_loader.rb +3 -9
  9. data/lib/rubocop/config_loader_resolver.rb +2 -6
  10. data/lib/rubocop/cop/autocorrect_logic.rb +1 -2
  11. data/lib/rubocop/cop/corrector.rb +1 -3
  12. data/lib/rubocop/cop/correctors/alignment_corrector.rb +2 -6
  13. data/lib/rubocop/cop/correctors/parentheses_corrector.rb +1 -3
  14. data/lib/rubocop/cop/correctors/space_corrector.rb +1 -3
  15. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -3
  16. data/lib/rubocop/cop/generator.rb +1 -1
  17. data/lib/rubocop/cop/ignored_node.rb +1 -3
  18. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +2 -6
  19. data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +62 -4
  20. data/lib/rubocop/cop/layout/first_argument_indentation.rb +0 -2
  21. data/lib/rubocop/cop/layout/first_array_element_indentation.rb +1 -3
  22. data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +1 -3
  23. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +2 -6
  24. data/lib/rubocop/cop/layout/indentation_width.rb +1 -3
  25. data/lib/rubocop/cop/layout/multiline_block_layout.rb +1 -3
  26. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -3
  27. data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +2 -6
  28. data/lib/rubocop/cop/layout/space_before_comment.rb +1 -3
  29. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +1 -3
  30. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +2 -6
  31. data/lib/rubocop/cop/lint/ambiguous_operator.rb +4 -2
  32. data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +133 -0
  33. data/lib/rubocop/cop/lint/erb_new_arguments.rb +2 -6
  34. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +11 -3
  35. data/lib/rubocop/cop/lint/percent_string_array.rb +1 -3
  36. data/lib/rubocop/cop/lint/suppressed_exception.rb +12 -1
  37. data/lib/rubocop/cop/lint/syntax.rb +1 -3
  38. data/lib/rubocop/cop/lint/useless_access_modifier.rb +1 -3
  39. data/lib/rubocop/cop/migration/department_name.rb +5 -9
  40. data/lib/rubocop/cop/mixin/alignment.rb +1 -3
  41. data/lib/rubocop/cop/mixin/array_min_size.rb +2 -6
  42. data/lib/rubocop/cop/mixin/check_line_breakable.rb +4 -12
  43. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -3
  44. data/lib/rubocop/cop/mixin/configurable_formatting.rb +1 -3
  45. data/lib/rubocop/cop/mixin/multiline_element_indentation.rb +1 -3
  46. data/lib/rubocop/cop/mixin/surrounding_space.rb +1 -3
  47. data/lib/rubocop/cop/mixin/trailing_comma.rb +1 -3
  48. data/lib/rubocop/cop/naming/file_name.rb +1 -3
  49. data/lib/rubocop/cop/registry.rb +2 -6
  50. data/lib/rubocop/cop/severity.rb +1 -3
  51. data/lib/rubocop/cop/style/and_or.rb +2 -2
  52. data/lib/rubocop/cop/style/attr.rb +1 -3
  53. data/lib/rubocop/cop/style/block_delimiters.rb +2 -8
  54. data/lib/rubocop/cop/style/conditional_assignment.rb +1 -3
  55. data/lib/rubocop/cop/style/double_negation.rb +41 -4
  56. data/lib/rubocop/cop/style/empty_literal.rb +1 -3
  57. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +2 -4
  58. data/lib/rubocop/cop/style/hash_syntax.rb +12 -5
  59. data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +1 -3
  60. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +1 -3
  61. data/lib/rubocop/cop/style/one_line_conditional.rb +2 -6
  62. data/lib/rubocop/cop/style/redundant_parentheses.rb +2 -6
  63. data/lib/rubocop/cop/style/safe_navigation.rb +2 -6
  64. data/lib/rubocop/cop/style/slicing_with_range.rb +1 -1
  65. data/lib/rubocop/cop/style/special_global_vars.rb +2 -6
  66. data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -3
  67. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +2 -6
  68. data/lib/rubocop/cop/variable_force.rb +3 -9
  69. data/lib/rubocop/cop/variable_force/branch.rb +2 -6
  70. data/lib/rubocop/cop/variable_force/variable.rb +2 -6
  71. data/lib/rubocop/ext/processed_source.rb +18 -0
  72. data/lib/rubocop/formatter/base_formatter.rb +0 -4
  73. data/lib/rubocop/formatter/disabled_config_formatter.rb +4 -12
  74. data/lib/rubocop/formatter/formatter_set.rb +1 -3
  75. data/lib/rubocop/options.rb +2 -8
  76. data/lib/rubocop/remote_config.rb +1 -3
  77. data/lib/rubocop/result_cache.rb +1 -3
  78. data/lib/rubocop/rspec/cop_helper.rb +1 -3
  79. data/lib/rubocop/rspec/expect_offense.rb +3 -9
  80. data/lib/rubocop/rspec/shared_contexts.rb +54 -16
  81. data/lib/rubocop/runner.rb +8 -10
  82. data/lib/rubocop/target_finder.rb +2 -6
  83. data/lib/rubocop/version.rb +5 -3
  84. metadata +19 -56
  85. data/lib/rubocop/ast/builder.rb +0 -85
  86. data/lib/rubocop/ast/node.rb +0 -637
  87. data/lib/rubocop/ast/node/alias_node.rb +0 -24
  88. data/lib/rubocop/ast/node/and_node.rb +0 -29
  89. data/lib/rubocop/ast/node/args_node.rb +0 -29
  90. data/lib/rubocop/ast/node/array_node.rb +0 -70
  91. data/lib/rubocop/ast/node/block_node.rb +0 -121
  92. data/lib/rubocop/ast/node/break_node.rb +0 -17
  93. data/lib/rubocop/ast/node/case_match_node.rb +0 -56
  94. data/lib/rubocop/ast/node/case_node.rb +0 -56
  95. data/lib/rubocop/ast/node/class_node.rb +0 -31
  96. data/lib/rubocop/ast/node/def_node.rb +0 -82
  97. data/lib/rubocop/ast/node/defined_node.rb +0 -17
  98. data/lib/rubocop/ast/node/ensure_node.rb +0 -17
  99. data/lib/rubocop/ast/node/float_node.rb +0 -12
  100. data/lib/rubocop/ast/node/for_node.rb +0 -53
  101. data/lib/rubocop/ast/node/forward_args_node.rb +0 -18
  102. data/lib/rubocop/ast/node/hash_node.rb +0 -109
  103. data/lib/rubocop/ast/node/if_node.rb +0 -175
  104. data/lib/rubocop/ast/node/int_node.rb +0 -12
  105. data/lib/rubocop/ast/node/keyword_splat_node.rb +0 -45
  106. data/lib/rubocop/ast/node/mixin/basic_literal_node.rb +0 -16
  107. data/lib/rubocop/ast/node/mixin/binary_operator_node.rb +0 -43
  108. data/lib/rubocop/ast/node/mixin/collection_node.rb +0 -15
  109. data/lib/rubocop/ast/node/mixin/conditional_node.rb +0 -45
  110. data/lib/rubocop/ast/node/mixin/hash_element_node.rb +0 -125
  111. data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +0 -269
  112. data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +0 -114
  113. data/lib/rubocop/ast/node/mixin/modifier_node.rb +0 -17
  114. data/lib/rubocop/ast/node/mixin/numeric_node.rb +0 -21
  115. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +0 -61
  116. data/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +0 -35
  117. data/lib/rubocop/ast/node/module_node.rb +0 -24
  118. data/lib/rubocop/ast/node/or_node.rb +0 -29
  119. data/lib/rubocop/ast/node/pair_node.rb +0 -63
  120. data/lib/rubocop/ast/node/range_node.rb +0 -18
  121. data/lib/rubocop/ast/node/regexp_node.rb +0 -33
  122. data/lib/rubocop/ast/node/resbody_node.rb +0 -24
  123. data/lib/rubocop/ast/node/retry_node.rb +0 -17
  124. data/lib/rubocop/ast/node/return_node.rb +0 -24
  125. data/lib/rubocop/ast/node/self_class_node.rb +0 -24
  126. data/lib/rubocop/ast/node/send_node.rb +0 -17
  127. data/lib/rubocop/ast/node/str_node.rb +0 -16
  128. data/lib/rubocop/ast/node/super_node.rb +0 -21
  129. data/lib/rubocop/ast/node/symbol_node.rb +0 -12
  130. data/lib/rubocop/ast/node/until_node.rb +0 -35
  131. data/lib/rubocop/ast/node/when_node.rb +0 -53
  132. data/lib/rubocop/ast/node/while_node.rb +0 -35
  133. data/lib/rubocop/ast/node/yield_node.rb +0 -21
  134. data/lib/rubocop/ast/sexp.rb +0 -16
  135. data/lib/rubocop/ast/traversal.rb +0 -202
  136. data/lib/rubocop/node_pattern.rb +0 -887
  137. data/lib/rubocop/processed_source.rb +0 -213
  138. data/lib/rubocop/token.rb +0 -114
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `defined?` nodes. This will be used in place of a
6
- # plain node when the builder constructs the AST, making its methods
7
- # available to all `send` nodes within RuboCop.
8
- class DefinedNode < Node
9
- include ParameterizedNode
10
- include MethodDispatchNode
11
-
12
- def node_parts
13
- [nil, :defined?, *to_a]
14
- end
15
- end
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `ensure` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available
7
- # to all `ensure` nodes within RuboCop.
8
- class EnsureNode < Node
9
- # Returns the body of the `ensure` clause.
10
- #
11
- # @return [Node, nil] The body of the `ensure`.
12
- def body
13
- node_parts[1]
14
- end
15
- end
16
- end
17
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `float` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available to
7
- # all `float` nodes within RuboCop.
8
- class FloatNode < Node
9
- include NumericNode
10
- end
11
- end
12
- end
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `for` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available
7
- # to all `for` nodes within RuboCop.
8
- class ForNode < Node
9
- # Returns the keyword of the `for` statement as a string.
10
- #
11
- # @return [String] the keyword of the `until` statement
12
- def keyword
13
- 'for'
14
- end
15
-
16
- # Checks whether the `for` node has a `do` keyword.
17
- #
18
- # @return [Boolean] whether the `for` node has a `do` keyword
19
- def do?
20
- loc.begin&.is?('do')
21
- end
22
-
23
- # Checks whether this node body is a void context.
24
- # Always `true` for `for`.
25
- #
26
- # @return [true] whether the `for` node body is a void context
27
- def void_context?
28
- true
29
- end
30
-
31
- # Returns the iteration variable of the `for` loop.
32
- #
33
- # @return [Node] The iteration variable of the `for` loop
34
- def variable
35
- node_parts[0]
36
- end
37
-
38
- # Returns the collection the `for` loop is iterating over.
39
- #
40
- # @return [Node] The collection the `for` loop is iterating over
41
- def collection
42
- node_parts[1]
43
- end
44
-
45
- # Returns the body of the `for` loop.
46
- #
47
- # @return [Node, nil] The body of the `for` loop.
48
- def body
49
- node_parts[2]
50
- end
51
- end
52
- end
53
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `forward-args` nodes. This will be used in place
6
- # of a plain node when the builder constructs the AST, making its methods
7
- # available to all `forward-args` nodes within RuboCop.
8
- class ForwardArgsNode < Node
9
- include CollectionNode
10
-
11
- # Node wraps itself in an array to be compatible with other
12
- # enumerable argument types.
13
- def to_a
14
- [self]
15
- end
16
- end
17
- end
18
- end
@@ -1,109 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `hash` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available
7
- # to all `hash` nodes within RuboCop.
8
- class HashNode < Node
9
- # Returns an array of all the key value pairs in the `hash` literal.
10
- #
11
- # @return [Array<PairNode>] an array of `pair` nodes
12
- def pairs
13
- each_pair.to_a
14
- end
15
-
16
- # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes.
17
- #
18
- # @return[Boolean] whether the `hash` is empty
19
- def empty?
20
- children.empty?
21
- end
22
-
23
- # Calls the given block for each `pair` node in the `hash` literal.
24
- # If no block is given, an `Enumerator` is returned.
25
- #
26
- # @return [self] if a block is given
27
- # @return [Enumerator] if no block is given
28
- def each_pair
29
- return each_child_node(:pair).to_enum unless block_given?
30
-
31
- each_child_node(:pair) do |pair|
32
- yield(*pair)
33
- end
34
-
35
- self
36
- end
37
-
38
- # Returns an array of all the keys in the `hash` literal.
39
- #
40
- # @return [Array<Node>] an array of keys in the `hash` literal
41
- def keys
42
- each_key.to_a
43
- end
44
-
45
- # Calls the given block for each `key` node in the `hash` literal.
46
- # If no block is given, an `Enumerator` is returned.
47
- #
48
- # @return [self] if a block is given
49
- # @return [Enumerator] if no block is given
50
- def each_key
51
- return pairs.map(&:key).to_enum unless block_given?
52
-
53
- pairs.map(&:key).each do |key|
54
- yield key
55
- end
56
-
57
- self
58
- end
59
-
60
- # Returns an array of all the values in the `hash` literal.
61
- #
62
- # @return [Array<Node>] an array of values in the `hash` literal
63
- def values
64
- each_pair.map(&:value)
65
- end
66
-
67
- # Calls the given block for each `value` node in the `hash` literal.
68
- # If no block is given, an `Enumerator` is returned.
69
- #
70
- # @return [self] if a block is given
71
- # @return [Enumerator] if no block is given
72
- def each_value
73
- return pairs.map(&:value).to_enum unless block_given?
74
-
75
- pairs.map(&:value).each do |value|
76
- yield value
77
- end
78
-
79
- self
80
- end
81
-
82
- # Checks whether any of the key value pairs in the `hash` literal are on
83
- # the same line.
84
- #
85
- # @note A multiline `pair` is considered to be on the same line if it
86
- # shares any of its lines with another `pair`
87
- #
88
- # @return [Boolean] whether any `pair` nodes are on the same line
89
- def pairs_on_same_line?
90
- pairs.each_cons(2).any? { |first, second| first.same_line?(second) }
91
- end
92
-
93
- # Checks whether this `hash` uses a mix of hash rocket and colon
94
- # delimiters for its pairs.
95
- #
96
- # @return [Boolean] whether the `hash` uses mixed delimiters
97
- def mixed_delimiters?
98
- pairs.map(&:delimiter).uniq.size > 1
99
- end
100
-
101
- # Checks whether the `hash` literal is delimited by curly braces.
102
- #
103
- # @return [Boolean] whether the `hash` literal is enclosed in braces
104
- def braces?
105
- loc.end&.is?('}')
106
- end
107
- end
108
- end
109
- end
@@ -1,175 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `if` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available
7
- # to all `if` nodes within RuboCop.
8
- class IfNode < Node
9
- include ConditionalNode
10
- include ModifierNode
11
-
12
- # Checks whether this node is an `if` statement. (This is not true of
13
- # ternary operators and `unless` statements.)
14
- #
15
- # @return [Boolean] whether the node is an `if` statement
16
- def if?
17
- keyword == 'if'
18
- end
19
-
20
- # Checks whether this node is an `unless` statement. (This is not true
21
- # of ternary operators and `if` statements.)
22
- #
23
- # @return [Boolean] whether the node is an `unless` statement
24
- def unless?
25
- keyword == 'unless'
26
- end
27
-
28
- # Checks whether the `if` is an `elsif`. Parser handles these by nesting
29
- # `if` nodes in the `else` branch.
30
- #
31
- # @return [Boolean] whether the node is an `elsif`
32
- def elsif?
33
- keyword == 'elsif'
34
- end
35
-
36
- # Checks whether the `if` node has an `else` clause.
37
- #
38
- # @note This returns `true` for nodes containing an `elsif` clause.
39
- # This is legacy behavior, and many cops rely on it.
40
- #
41
- # @return [Boolean] whether the node has an `else` clause
42
- def else?
43
- loc.respond_to?(:else) && loc.else
44
- end
45
-
46
- # Checks whether the `if` node is a ternary operator.
47
- #
48
- # @return [Boolean] whether the `if` node is a ternary operator
49
- def ternary?
50
- loc.respond_to?(:question)
51
- end
52
-
53
- # Returns the keyword of the `if` statement as a string. Returns an empty
54
- # string for ternary operators.
55
- #
56
- # @return [String] the keyword of the `if` statement
57
- def keyword
58
- ternary? ? '' : loc.keyword.source
59
- end
60
-
61
- # Returns the inverse keyword of the `if` node as a string. Returns `if`
62
- # for `unless` nodes and vice versa. Returns an empty string for ternary
63
- # operators.
64
- #
65
- # @return [String] the inverse keyword of the `if` statement
66
- def inverse_keyword
67
- if keyword == 'if'
68
- 'unless'
69
- elsif keyword == 'unless'
70
- 'if'
71
- else
72
- ''
73
- end
74
- end
75
-
76
- # Checks whether the `if` node is in a modifier form, i.e. a condition
77
- # trailing behind an expression. Only `if` and `unless` nodes without
78
- # other branches can be modifiers.
79
- #
80
- # @return [Boolean] whether the `if` node is a modifier
81
- def modifier_form?
82
- (if? || unless?) && super
83
- end
84
-
85
- # Chacks whether the `if` node has nested `if` nodes in any of its
86
- # branches.
87
- #
88
- # @note This performs a shallow search.
89
- #
90
- # @return [Boolean] whether the `if` node contains nested conditionals
91
- def nested_conditional?
92
- node_parts[1..2].compact.each do |branch|
93
- branch.each_node(:if) do |nested|
94
- return true unless nested.elsif?
95
- end
96
- end
97
-
98
- false
99
- end
100
-
101
- # Checks whether the `if` node has at least one `elsif` branch. Returns
102
- # true if this `if` node itself is an `elsif`.
103
- #
104
- # @return [Boolean] whether the `if` node has at least one `elsif` branch
105
- def elsif_conditional?
106
- else_branch&.if_type? && else_branch&.elsif?
107
- end
108
-
109
- # Returns the branch of the `if` node that gets evaluated when its
110
- # condition is truthy.
111
- #
112
- # @note This is normalized for `unless` nodes.
113
- #
114
- # @return [Node] the truthy branch node of the `if` node
115
- # @return [nil] if the truthy branch is empty
116
- def if_branch
117
- node_parts[1]
118
- end
119
-
120
- # Returns the branch of the `if` node that gets evaluated when its
121
- # condition is falsey.
122
- #
123
- # @note This is normalized for `unless` nodes.
124
- #
125
- # @return [Node] the falsey branch node of the `if` node
126
- # @return [nil] when there is no else branch
127
- def else_branch
128
- node_parts[2]
129
- end
130
-
131
- # Custom destructuring method. This is used to normalize the branches
132
- # for `if` and `unless` nodes, to aid comparisons and conversions.
133
- #
134
- # @return [Array<Node>] the different parts of the `if` statement
135
- def node_parts
136
- if unless?
137
- condition, false_branch, true_branch = *self
138
- else
139
- condition, true_branch, false_branch = *self
140
- end
141
-
142
- [condition, true_branch, false_branch]
143
- end
144
-
145
- # Returns an array of all the branches in the conditional statement.
146
- #
147
- # @return [Array<Node>] an array of branch nodes
148
- def branches
149
- branches = [if_branch]
150
-
151
- return branches unless else_branch
152
-
153
- other_branches = if elsif_conditional?
154
- else_branch.branches
155
- else
156
- [else_branch]
157
- end
158
- branches.concat(other_branches)
159
- end
160
-
161
- # Calls the given block for each branch node in the conditional statement.
162
- # If no block is given, an `Enumerator` is returned.
163
- #
164
- # @return [self] if a block is given
165
- # @return [Enumerator] if no block is given
166
- def each_branch
167
- return branches.to_enum(__method__) unless block_given?
168
-
169
- branches.each do |branch|
170
- yield branch
171
- end
172
- end
173
- end
174
- end
175
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `int` nodes. This will be used in place of a plain
6
- # node when the builder constructs the AST, making its methods available to
7
- # all `int` nodes within RuboCop.
8
- class IntNode < Node
9
- include NumericNode
10
- end
11
- end
12
- end
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module AST
5
- # A node extension for `kwsplat` nodes. This will be used in place of a
6
- # plain node when the builder constructs the AST, making its methods
7
- # available to all `kwsplat` nodes within RuboCop.
8
- class KeywordSplatNode < Node
9
- include HashElementNode
10
-
11
- DOUBLE_SPLAT = '**'
12
-
13
- # This is used for duck typing with `pair` nodes which also appear as
14
- # `hash` elements.
15
- #
16
- # @return [false]
17
- def hash_rocket?
18
- false
19
- end
20
-
21
- # This is used for duck typing with `pair` nodes which also appear as
22
- # `hash` elements.
23
- #
24
- # @return [false]
25
- def colon?
26
- false
27
- end
28
-
29
- # Returns the operator for the `kwsplat` as a string.
30
- #
31
- # @return [String] the double splat operator
32
- def operator
33
- DOUBLE_SPLAT
34
- end
35
-
36
- # Custom destructuring method. This is used to normalize the branches
37
- # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements.
38
- #
39
- # @return [Array<KeywordSplatNode>] the different parts of the `kwsplat`
40
- def node_parts
41
- [self, self]
42
- end
43
- end
44
- end
45
- end