question

AdamStapleton-3951 avatar image
1 Vote"
AdamStapleton-3951 asked AdamStapleton-3951 answered

Somewhere to find new .editorconfig rules for c#10 and .NET 6?

Is there somewhere where the newly added code style rules and editor config options are documented (including release dates of them)?

I can't find anywhere with a list of the rules that are added with each version and this makes it difficult to add new rules to an existing project.

dotnet-csharpdotnet-runtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AdamStapleton-3951 avatar image
0 Votes"
AdamStapleton-3951 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sreejukg avatar image
0 Votes"
sreejukg answered AdamStapleton-3951 commented

The editor config options are based on editorconfig.org. This helps developers to define and maintain consistent coding style conventions between different editors Refer https://editorconfig.org/

You may read the complete specification from https://editorconfig-specification.readthedocs.io/

For Visual studio specific settings, you may refer https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes-v15.0#coding-convention-support-through-editorconfig

If you are using Visual Studio for Mac, refer

https://github.com/mikerochip/editorconfig-monodevelop#readme


Hope this helps

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the response. I think you may have misunderstood the question. For example, in .NET 6, relating to C#10 feature of file scoped namespaces. There is a new code style rule that's not documented called "csharp_style_namespace_declarations = file_scoped". I found out about this via a stream from a community member.

I was wondering if there's somewhere that you publish the new rules when they're created. VS allows you to add these code style rules into the .editorconfig file. But I can't find anywhere that tells us when and which new rules are being added. So one day they will just show up and we wouldn't know about them?

0 Votes 0 ·

Those are the rules I'm talking about yeah. Is there not a page with new rules letting people know when they were added?

0 Votes 0 ·
XingyuZhao-MSFT avatar image
0 Votes"
XingyuZhao-MSFT answered AdamStapleton-3951 commented

Hi @AdamStapleton-3951 ,
Some references you may need:

You can report any issues you find with .NET 6 here.

Hope them could be helpful.

Best Regards,
Xingyu Zhao


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

They don't have any information on analysers or code fixes unfortunately (if they do it's not easy to find). There are docs pages for the features as you've pointed out so simple notes on the new releases pages would accomplish what I'm commenting on. "This comes with a new analyser that will recommend using file scoped namespaces instead of nested ones and uses rule CAXXXX" (here for example, https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#file-scoped-namespace-declaration)

0 Votes 0 ·