Fix formatting for multi-line patterns#46292
Conversation
...paces/SharedUtilitiesAndExtensions/Compiler/Core/Formatting/BottomUpBaseIndentationFinder.cs
Outdated
Show resolved
Hide resolved
| /// Mask for position options | ||
| /// </summary> | ||
| PositionMask = RelativeToFirstTokenOnBaseTokenLine | RelativePosition | AbsolutePosition | ||
| PositionMask = RelativeToFirstTokenOnBaseTokenLine | RelativePosition | AbsolutePosition, |
There was a problem hiding this comment.
i think this should actually doc why this doesn't cover the item below.
There was a problem hiding this comment.
Indirectly documented. Let me know if it works.
There was a problem hiding this comment.
sorry, not seeing it, even after rereviewing things.
There was a problem hiding this comment.
IndentIfConditionOfAnchorToken is not a primary behavior.
There was a problem hiding this comment.
this should be documented. the problem with the code/comemtns as they exist today is that i cannot come back and determine if this is an intentional or accidental omission. i.e. the comment says "specifies one of the position options to indicate the primary behavior for the operation." First, i don't know what "primary behavior" means. Second, i have no way to tell if 'IndentIfConditionOfAnchorToken' is not primary, and thus is appropraite not in this list, or if it is primary, and this is just a mistake.
This is a prime example of why more is more when it comes to certain types of comments. Just being explicit about intentions here goes a long way for future maintainability.
Fixes #42861
Fixes #46284