dennisdoomen / CSharpGuidelines

A set of coding guidelines for C# 9.0, design principles and layout rules for improving the overall quality of your code development.
https://www.csharpcodingguidelines.com
Other
746 stars 271 forks source link

Update guidance for C# 8/9/10 #245

Closed bkoelman closed 2 years ago

bkoelman commented 2 years ago

I've reviewed the language changes in C# 8, 9 and 10 in an attempt to update CSharpGuidelines.

I'm reluctant to add rules that recommend using the various syntax enhancements in recent C# versions. These are already being suggested by Rider/Resharper (or Visual Studio itself) and can be configured to produce warnings. While it's good for teams to standardize on such syntax, there's little point in spelling them out here. Amongst these are:

Then there's a category of features that I suspect most application developers aren't likely to care much about:

I've skipped nullable reference types, as there's already great guidance and tooling for that.

Then there's record types, which I haven't used yet, so nothing to report there from me.

What's left are features that I wouldn't know any guidance to provide for:

Based on the above, I've created https://github.com/dennisdoomen/CSharpGuidelines/pull/241 and https://github.com/dennisdoomen/CSharpGuidelines/pull/244, which concludes my investigation.

Once these are merged, I think we can extend the supported version range to C# 10.

Feedback and suggestions welcome!

bkoelman commented 2 years ago

I noticed https://github.com/dennisdoomen/CSharpGuidelines/commit/34949fae383678e2a6bea80b30105e034a4f453e, which increments to C# 9, but I believe it should be C# 10, which was released last year.

dennisdoomen commented 2 years ago

I knew I should have used a PR for that ;-)

dennisdoomen commented 2 years ago

Is there anything else you want to do with this issue?

bkoelman commented 2 years ago

I'm okay with closing this, but perhaps keep it open a little longer to allow community members to chime in?

bkoelman commented 2 years ago

CLosing due to inactivity.

@dennisdoomen can you create a new release, so I can align CSharpGuidelinesAnalyzer with the latest changes?