Closure method invocation parentheses not aligning correctly when creating an object in params
why is Rider's formatting putting the closure ')' aligned with the curly brackets that are inside the method call? for example:
_cache.Set(
token,
new General.CachedSession {
timestamp = session.timestamp, valid = true
},
TimeSpan.FromHours(6)
);when it should be:
_cache.Set(
token,
new General.CachedSession {
timestamp = session.timestamp, valid = true
},
TimeSpan.FromHours(6)
);
Please sign in to leave a comment.
Jesus, would you mind clarifying if this issue affects formatting only as you type or (e.g.
(6)<Enter>);) or does the formatting in the affected file stay the same even after you trigger formatting manually (Reformat current selection/Cleanup)?Only as I type. Manually formatting works correctly
Thank you for the clarification. I've reproduced this behavior and filed a corresponding issue RSRP-503546 Incorrect position of ')' in method invocation. Please follow (★) the linked issue for updates. The only workaround I can suggest at this time is to periodically trigger formatting in the affected file/project.
thank you!