Skip to content

Commit

Permalink
Add some tests for call chains with different comment placements
Browse files Browse the repository at this point in the history
  • Loading branch information
reese authored Aug 23, 2023
1 parent 6bc8a3a commit 24f4b27
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fixtures/small/single_line_method_call_chain_actual.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ def blorp
)

this.surprisingly.can_break
# due to this comment being here!
# due to this comment being here!

this.wont.break # If there's a super long comment here that goes over the line limit weeeeeeeeeeeeeeeeeeee look at this one go

this.is_really_long.and_will_go_beyond_the_maximum_line_length_and_break.across_multiple_lines.and_it_has_a_comment_after_it! # And there's a comment here

this.is_really_long.and_will_go_beyond_the_maximum_line_length_and_break.across_multiple_lines.and_it_has_a_comment_after_it!
# See what happens to this comment here!
17 changes: 17 additions & 0 deletions fixtures/small/single_line_method_call_chain_expected.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,20 @@ def blorp

this.surprisingly.can_break
# due to this comment being here!

# If there's a super long comment here that goes over the line limit weeeeeeeeeeeeeeeeeeee look at this one go
this.wont.break

# And there's a comment here
this
.is_really_long
.and_will_go_beyond_the_maximum_line_length_and_break
.across_multiple_lines
.and_it_has_a_comment_after_it!

this
.is_really_long
.and_will_go_beyond_the_maximum_line_length_and_break
.across_multiple_lines
.and_it_has_a_comment_after_it!
# See what happens to this comment here!

0 comments on commit 24f4b27

Please sign in to comment.