DEV Community

Discussion on: C# Linting and Formatting Tools in 2021

Collapse
 
shadowcs profile image
Honza Rameš • Edited

Great article, thanks.

However I'd advice against using rulesets at this time and migrate to .editorconfigs which offer more options (but you'll loose the GUI for editing rulesets - which have its quirks for .NET Core projects anyway). See docs.microsoft.com/en-us/visualstu.... You can port between the two, see github.com/dotnet/roslyn/issues/41393.

Also there are two more analyzers worth mentioning: Roslynator and FxCop. FxCop is now part of the .NET SDK (since 5.0) and renamed to .NET analyzers. Several rules have been discontinued and a lot of rules (or all, depends on TargetFramework) are disabled by default. See docs.microsoft.com/en-us/dotnet/fu....

Collapse
 
srmagura profile image
Sam Magura

Thanks for bringing this up Honza. I did not know you could configure rules via .editorconfig. I'll try to get that working and then update the post accordingly.

Reference on how to use .editorconfig to configure rules: docs.microsoft.com/en-us/visualstu...