You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Situation where code formatting is not idempotent and creates really long comment #149
def foo(bar)
Foo
.where(
id: bar
)
# The second condition helps to skip the newly create runtime stated as "initialized"
# The first condition helps to skip the soft deleted runtime marked as "remote_deleted"
# that hasn't been appeared in ProdRegistry
.where(<<-SQL)
(foo)
SQL
end
def foo(bar)
Foo.where(
id: bar
)# The second condition helps to skip the newly create runtime stated as "initialized"
# The first condition helps to skip the soft deleted runtime marked as "remote_deleted"
# that hasn't been appeared in ProdRegistry
.
where(<<-SQL)
(foo)
SQL
end
def foo(bar)
Foo.where(
id: bar
)# The first condition helps to skip the soft deleted runtime marked as "remote_deleted" # The second condition helps to skip the newly create runtime stated as "initialized"
# that hasn't been appeared in ProdRegistry
.
where(<<-SQL)
(foo)
SQL
end
def foo(bar)
Foo.where(id: bar)# that hasn't been appeared in ProdRegistry # The first condition helps to skip the soft deleted runtime marked as "remote_deleted" # The second condition helps to skip the newly create runtime stated as "initialized"
.
where(<<-SQL)
(foo)
SQL
end
def foo(bar)
Foo.where(id: bar) # that hasn't been appeared in ProdRegistry # The first condition helps to skip the soft deleted runtime marked as "remote_deleted" # The second condition helps to skip the newly create runtime stated as "initialized"
.where(<<-SQL)
(foo)
SQL
end
Reacted by David Taylor, maxnotarangelo and Jesse-Cameron
changed the title [-]Situation where code formatting is not idempotent[/-][+]Situation where code formatting is not idempotent and creates really long comment[/+]on Aug 25, 2022
Activity
[-]Situation where code formatting is not idempotent[/-][+]Situation where code formatting is not idempotent and creates really long comment[/+]maxnotarangelo commentedon Aug 29, 2023
I'm getting (presumably) the same bug when there's a comment between lines in a method chain:
Original code:
After the first run:
After the second run:
Interestingly, if it's pure method calls, it does the nice-looking thing and is idempotent. Original:
After formatting: