Skip to content

Update .editorconfig template to set dotnet_separate_import_directive_groups to false - #50476

Merged
baronfel merged 2 commits into
dotnet:mainfrom
wdolek:editorconfig-dotnet-template-default-separation-of-imports
Oct 5, 2026
Merged

baronfel merged 2 commits into
dotnet:mainfrom
wdolek:editorconfig-dotnet-template-default-separation-of-imports

Conversation

@wdolek

@wdolek wdolek commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

This PR updates the default .editorconfig file generated by calling dotnet new editorconfig, so that generated file contains:

dotnet_separate_import_directive_groups = false

(default value) instead of true.

Rationale

The current template sets dotnet_separate_import_directive_groups to true, which causes IDEs and analyzers to insert blank lines between groups of using directives.

In practice, this style does not appear to be widely adopted in the .NET ecosystem - neither in Microsoft-maintained repositories nor in many popular community libraries. From reviewing current codebases, the more common convention is to omit blank lines between using groups.

While formatting preferences are subjective, leaving this setting at its default (false) better aligns the generated template with the style most developers are likely to encounter in existing .NET projects. It also avoids surprising developers who run dotnet new editorconfig and later have to change this value back during code reviews.


This is a minor change, but if I’ve missed any additional template/test updates, please let me know and I’ll adjust.

@wdolek
wdolek requested a review from a team as a code owner August 25, 2025 19:34
@github-actions

Copy link
Copy Markdown
Contributor

This PR is targeting main, which is now for .NET 11-facing work. If you intended to target .NET 10, either retarget this PR to release/10.0.1xx or make sure you backport the change to release/10.0.1xx after merging. See #50394 for more details.

@marcpopMSFT marcpopMSFT added the Area-Common templates Covers templates in the repo (classlib, console, common item templates) label Aug 28, 2025
@Frulfump

Copy link
Copy Markdown

2 checks failed, unsure if related

@wdolek
wdolek force-pushed the editorconfig-dotnet-template-default-separation-of-imports branch from 5f9d0ae to c82a2e4 Compare February 22, 2026 22:40
@Frulfump

Copy link
Copy Markdown

And now it's 4 checks failed but the code is the same. @jaredpar @MiYanni maybe CI is flaky and this could get merged either way?

@github-actions

Copy link
Copy Markdown
Contributor

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

@github-actions github-actions Bot added the stale label May 27, 2026
@Frulfump

Copy link
Copy Markdown

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

Just waiting for maintainers to acknowledge previous comment

@github-actions github-actions Bot removed the stale label May 28, 2026
@wdolek
wdolek force-pushed the editorconfig-dotnet-template-default-separation-of-imports branch from 7bdad2b to 8e1b737 Compare May 28, 2026 20:59
@github-actions

Copy link
Copy Markdown
Contributor

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

@github-actions github-actions Bot added the stale label Jul 28, 2026
@Frulfump

Copy link
Copy Markdown

Hoping this could land in .NET 11

@github-actions github-actions Bot removed the stale label Jul 28, 2026
@wdolek

wdolek commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@jaredpar I know this isn't a huge change, but who do I need to ping to get this merged?

@wdolek
wdolek requested a review from a team as a code owner September 12, 2026 20:46
@wdolek
wdolek force-pushed the editorconfig-dotnet-template-default-separation-of-imports branch from 0ef4af6 to 2e76d73 Compare September 23, 2026 21:09
@baronfel

baronfel commented Oct 5, 2026

Copy link
Copy Markdown
Member

/ba-g flaky test on the Windows Framework leg

@baronfel
baronfel merged commit a0385d6 into dotnet:main Oct 5, 2026
21 of 23 checks passed
@baronfel
baronfel temporarily deployed to copilot-pat-pool October 5, 2026 23:51 — with GitHub Actions Inactive
@baronfel

baronfel commented Oct 5, 2026

Copy link
Copy Markdown
Member

Thanks for this @wdolek, and sorry for this one slipping through the cracks.

@baronfel
baronfel temporarily deployed to copilot-pat-pool October 5, 2026 23:51 — with GitHub Actions Inactive
@baronfel

baronfel commented Oct 5, 2026

Copy link
Copy Markdown
Member

/backport to release/10.0.2xx

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0.2xx (link to workflow run)

@Frulfump

Frulfump commented Oct 6, 2026

Copy link
Copy Markdown

/backport to release/10.0.2xx

Happy to see this merged and backported but didn't 10.0.2xx go out of support in May? https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#supported-net-versions

(Can't AI be used to help with things not falling through the cracks?)

@baronfel

baronfel commented Oct 6, 2026

Copy link
Copy Markdown
Member

/backport to release/11.0.2xx

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0.2xx (link to workflow run)

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 59e71e6b Deployed Oct 5, 2026 by baronfel via pat_pool #7673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Common templates Covers templates in the repo (classlib, console, common item templates) Area-Infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants