Skip to content

Format new document namespace declarations#55504

Merged
davidwengier merged 2 commits intodotnet:mainfrom
davidwengier:FormatNewDocumentNamespaceDeclarations
Aug 10, 2021
Merged

Format new document namespace declarations#55504
davidwengier merged 2 commits intodotnet:mainfrom
davidwengier:FormatNewDocumentNamespaceDeclarations

Conversation

@davidwengier
Copy link
Member

Fixes #55417

@ghost ghost added the Area-IDE label Aug 9, 2021
@davidwengier davidwengier force-pushed the FormatNewDocumentNamespaceDeclarations branch from c96b930 to f06c9a2 Compare August 10, 2021 01:10
@davidwengier davidwengier marked this pull request as ready for review August 10, 2021 01:10
@davidwengier davidwengier requested a review from a team as a code owner August 10, 2021 01:10
}

[Fact]
public async Task TestFileScopedNamespaces_Invalid1()
Copy link
Contributor

Choose a reason for hiding this comment

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

Invalid{1, 2} could use an explanation of why they are invalid. It took me a second to realize 2 was because of the language version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed

return TestCoreAsync<object>(testCode, expected, options: null, parseOptions: null);
}

internal Task TestAsync<T>(string testCode, string expected, (PerLanguageOption2<T>, T)[]? options = null, ParseOptions? parseOptions = null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a test with multiple (PerLanguageOption2<T>, T) values?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, there isn't. I could simplify this I guess.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, decided to leave it. I don't think it causes much pain, and its reasonable future proofing

@davidwengier davidwengier enabled auto-merge (squash) August 10, 2021 08:18
@davidwengier davidwengier merged commit 782f71d into dotnet:main Aug 10, 2021
@ghost ghost added this to the Next milestone Aug 10, 2021
@davidwengier davidwengier deleted the FormatNewDocumentNamespaceDeclarations branch August 10, 2021 11:51
@dibarbet dibarbet modified the milestones: Next, 17.0.P4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AbstractEditorFactory should respect csharp_style_namespace_declarations setting.

3 participants