stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.59k stars 952 forks source link

Contributing guidelines (code style and file headers) #86

Open xen2 opened 6 years ago

xen2 commented 6 years ago

Not everybody might use resharper (and I am personally trying to use it less) so we need to have coding guidelines and file header explained somewhere.

Kryptos-FR commented 6 years ago

We could try to migrate most ReSharper rules to .editorconfig: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference

xen2 commented 6 years ago

Good, I vaguely remembered there was something like this and wanted to check into it. Let's use that (and no need to write a big doc file, this could be our reference).

Ideally it would be good to enforce all code (might be some huge commits) and run checker on each commits early before too many people work on the code.

Kryptos-FR commented 6 years ago

There should be some CI integration possible in GitHub as well, to add checks in pull-requests.

SebastianStehle commented 6 years ago

I suggest to use roslyn analyzers. There are a lot of analyzers like https://github.com/DotNetAnalyzers/StyleCopAnalyzers and they run in the IDE and build.

xen2 commented 6 years ago

@SebastianStehle Thanks. I would like to go this way (StyleCop analyzer and a bunch of others, enabled on CI as well). This would ensure consistent coding style and early detection of code issues.

However I was curious as to why no other big project I checked are using it (NuGet, dotnet corefx/roslyn, MonoGame, etc...). Is it because too restrictive, too slow or something else? Do you know of any large/famous project using it in production?

SebastianStehle commented 6 years ago

No, unfortunately not. All companies I worked for used resharper for that. I use it for my open source project, but it is neither large nor famous: https://github.com/Squidex/squidex

XUnit has a roslyn analyzer integrated as well.

jason-wilmans commented 6 years ago

Yeah I use ReSharper as well. In professional and in personal development.