Skip to content

Call new document formatting service from extract type#55522

Merged
davidwengier merged 2 commits intodotnet:mainfrom
davidwengier:FormatNewDocumentFromExtractType
Aug 12, 2021
Merged

Call new document formatting service from extract type#55522
davidwengier merged 2 commits intodotnet:mainfrom
davidwengier:FormatNewDocumentFromExtractType

Conversation

@davidwengier
Copy link
Member

This makes Extract Type/Interface use the new document formatting service, so it now supports file header templates from .editorconfig, and using directive placement options, and other fun things.

@davidwengier davidwengier requested a review from a team as a code owner August 10, 2021 01:07
@ghost ghost added the Area-IDE label Aug 10, 2021
Copy link
Contributor

@ryzngard ryzngard left a comment

Choose a reason for hiding this comment

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

Love it! 🖤 :shipit:

<Workspace>
<Project Language=""C#"">
<Document FilePath=""Test.cs"">// this is my document header
// that should be ignored
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
// that should be ignored
// that should be changed

Copy link
Member Author

Choose a reason for hiding this comment

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

um.. I don't understand?

This header is ignored because its overridden by the real document header from the setting, when creating the new file, but the existing file is not affected at all. The "File banner incorrect" analyzer would presumably trigger on this, however.

@davidwengier davidwengier merged commit 84383fa into dotnet:main Aug 12, 2021
@davidwengier davidwengier deleted the FormatNewDocumentFromExtractType branch August 12, 2021 23:53
@ghost ghost added this to the Next milestone Aug 12, 2021
@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.

4 participants