dotnet / templating

This repo contains the Template Engine which is used by dotnet new
https://docs.microsoft.com/dotnet/
MIT License
1.64k stars 370 forks source link

Developers enjoy `dotnet format` UXs, in line with VS UXs #5505

Open vlada-shubina opened 2 years ago

vlada-shubina commented 2 years ago

Background

After the template is generated by dotnet new, it might not match formatting defined in .editorconfig in the output location. Visual Studio applies .editorconfig rules to generated files, making behavior different Audience: users

Technical details

Raw thoughts

Justification

vlada-shubina commented 2 years ago

@baronfel / @JanKrivanek please feel free to put more info if needed

vlada-shubina commented 2 years ago

related: https://github.com/dotnet/templating/issues/4798; https://github.com/dotnet/templating/issues/1248

glen-84 commented 1 year ago

As mentioned in #4798:

The problem with that is that dotnet format doesn't support files like .csproj .sln, .cshtml .razor, or other template files like appsettings.json, etc.

I wonder if dotnet format should add support for basic EditorConfig formatting in all (most) file types.


I've opened https://github.com/dotnet/format/issues/1798.

DamianEdwards commented 9 months ago

Seems this is still triaged into 8.0. Can we look at this for an upcoming SDK release?

baronfel commented 9 months ago

We should remove that assignment - we need to triage this again now that templating has moved teams.