Commit efe3f1d
committed
Fix offenses for InternalAffairs/NodePatternGroups cop
This cop was added by the following PR.
- rubocop/rubocop#13762
```
Offenses:
lib/rubocop/cop/rspec/context_wording.rb:70:63: C: [Corrected] InternalAffairs/NodePatternGroups: Replace str, dstr, xstr in node pattern union with any_str.
(block (send #rspec? { :context :shared_context } $({str dstr xstr} ...) ...) ...)
^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec/mixin/final_end_location.rb:10:34: C: [Corrected] InternalAffairs/NodeTypeGroup: Use :any_str instead of individually listing group types.
start_node.each_node(:str, :dstr, :xstr)
^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec/mixin/variable.rb:16:15: C: [Corrected] InternalAffairs/NodePatternGroups: Replace sym, dsym in node pattern union with any_sym.
$({sym str dsym dstr} ...) ...)
^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec/predicate_matcher.rb:184:36: C: [Corrected] Style/SymbolProc: Pass &:any_str_type? as an argument to select instead of a block.
matcher.arguments.select do |arg| ...
^^^^^^^^
lib/rubocop/cop/rspec/predicate_matcher.rb:185:23: C: [Corrected] InternalAffairs/NodeTypeGroup: Use :any_str instead of individually listing group types.
arg.type?(:str, :dstr, :xstr)
^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec/sort_metadata.rb:33:28: C: [Corrected] InternalAffairs/NodePatternGroups: Replace str, dstr, xstr in node pattern union with any_str.
(send _ _ _ ... !{hash sym str dstr xstr})
^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rspec/variable_definition.rb:72:22: C: [Corrected] InternalAffairs/NodeTypeGroup: Use :any_sym instead of individually listing group types.
node.type?(:sym, :dsym)
^^^^^^^^^^^
282 files inspected, 7 offenses detected, 7 offenses corrected
```1 parent 812bdfe commit efe3f1d
File tree
6 files changed
+6
-8
lines changed- lib/rubocop/cop/rspec
- mixin
6 files changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 184 | + | |
187 | 185 | | |
188 | 186 | | |
189 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments