Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix switch indentation for list patterns #75953

Merged

Conversation

obonn1
Copy link
Contributor

@obonn1 obonn1 commented Nov 18, 2024

fixes #72196

The indentation of a list pattern or collection expression is (according to pre-existing comment in the adjusted method) "relative to the start of the line the prior token is on if we're on the same line as it." However, the code was missing a check for the two tokens being on the same line.

@obonn1 obonn1 requested a review from a team as a code owner November 18, 2024 06:34
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 18, 2024
@dotnet-policy-service dotnet-policy-service bot added Community The pull request was submitted by a contributor who is not a Microsoft employee. VSCode labels Nov 18, 2024
@obonn1 obonn1 marked this pull request as draft November 18, 2024 09:08
@obonn1 obonn1 force-pushed the feature/fix_switch_indentation_for_list branch from d575e61 to 33c85a2 Compare November 20, 2024 09:03
@obonn1 obonn1 force-pushed the feature/fix_switch_indentation_for_list branch from 33c85a2 to cd5a93b Compare November 20, 2024 09:05
@obonn1 obonn1 marked this pull request as ready for review November 20, 2024 15:15
@obonn1 obonn1 force-pushed the feature/fix_switch_indentation_for_list branch from 2a9ec27 to 27e507b Compare December 2, 2024 14:29
@obonn1
Copy link
Contributor Author

obonn1 commented Dec 3, 2024

@CyrusNajmabadi This should be ready for a new look whenever you have time

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List pattern is not correctly formatted in the first case of a switch expression
3 participants