Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

Fixes #46665

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 8, 2024 05:41
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 8, 2024
@CyrusNajmabadi
Copy link
Member Author

@JoeRobich @ToddGrun ptal


protected TExpressionSyntax Indent(TExpressionSyntax expression, IndentationOptions indentationOptions)
{
var insertionText = indentationOptions.FormattingOptions.UseTabs
Copy link
Member

Choose a reason for hiding this comment

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

So, perhaps my mental model of UseTab, TabSize, and IndentSize are wrong, but I thought that the indentation was always IndentSize spaces wide and that could use 1 or more tabs based on TabSize.

UseTabs = true
TabSize = 2
IndentSize = 4

each indent would be \t\t.

UseTabs = false
TabSize = 2
IndentSize = 4

each indent would be \s\s\s\s.

Copy link
Member Author

Choose a reason for hiding this comment

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

you are correct. this doesn't properly implement the desired indentation logic. I will fixup. Nice catch.

@CyrusNajmabadi CyrusNajmabadi merged commit f5b1f06 into dotnet:main Dec 10, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 10, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the useObjectInitIndentation branch December 10, 2024 01:28
@dibarbet dibarbet modified the milestones: Next, 17.13 P3 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE 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.

IDE0017 does not preserve indentation

3 participants