Commit 300e29b
Fix an error for
This PR fixes the following error for `Style/SoleNestedConditional`
when using nested single line `if`:
```console
$ echo "if foo; if bar; end; end" | bundle exec rubocop --stdin example.rb --only Style/SoleNestedConditional -A -d
(snip)
Inspecting 1 file
Scanning /Users/koic/src/github.com/rubocop/rubocop/example.rb
An error occurred while Style/SoleNestedConditional cop was inspecting
/Users/koic/src/github.com/rubocop/rubocop/example.rb:1:0.
/Users/koic/.rbenv/versions/3.5-dev/lib/ruby/gems/3.5.0+4/gems/parser-3.3.10.0/lib/parser/source/tree_rewriter.rb:427:
in 'Parser::Source::TreeRewriter#trigger_policy': Parser::Source::TreeRewriter detected clobbering (Parser::ClobberingError)
```Style/SoleNestedConditional
1 parent eb0b07a commit 300e29b
File tree
3 files changed
+20
-1
lines changed- changelog
- lib/rubocop/cop/style
- spec/rubocop/cop/style
3 files changed
+20
-1
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
| 148 | + | |
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
684 | 695 | | |
685 | 696 | | |
686 | 697 | | |
| |||
0 commit comments