Open sander1095 opened 2 years ago
Perhaps this should be a new issue, but perhaps the extension should also take a look if something like ImplicitUsings
are used in the project. That way the using statements might not be required if they are already imported globally.
Was just looking for if there are possible settings I could set to make it not use blocked/braces based namespace
.
Description
If you currently create a
.cs
file, the file is just created without conforming to the rules of an .editorconfig in the project. This is a bit of shame, because it requires either manual editing of the created file or changes to the templates of this extension. This wastes the developers time and makes the extension difficult to use for multiple projecs with different code styles.I think it would be a nice addition to make the file conform to the .editorconfig of the project, or the formatting preferences of the user's IDE. Perhaps an abstraction for this already exists because
format document
in VS listens to the editorconfig or if that odes not exist, to the VS settings.This also covers #50 and #67.
Steps to reproduce
Expected behavior:
.cs
file.cs
should be formatted as required by the editorconfig.Actual behavior:
Example
.editorconfig
file with the following in it:csharp_style_namespace_declarations = file_scoped:warning
.cs
file:If this extension would format the file according to the rules of the editorconfig (and format it after creation), it could look like this:
Benefits