Open xen2 opened 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
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.
There should be some CI integration possible in GitHub as well, to add checks in pull-requests.
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.
@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?
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.
Yeah I use ReSharper as well. In professional and in personal development.
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.