Open balanikas opened 4 years ago
I second the use on analysers. We should also add this analyser to add some Episerver best practices: https://world.episerver.com/blogs/mads-storm-hansen/dates/2019/11/introducing-code-analyzers-for-episerver/
This might be a harder sell but Install-Package StyleCop.Analyzers would help as well.
Adding and enabling analyzers in the foundation solution produces warnings and recommendation that increase awareness of code issues and therefore code quality.
Add these 2 analyzers: https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers (strongly recommended) which is a collection of recommended analyzers by Microsoft. https://www.nuget.org/packages/microsoft.visualstudio.threading.analyzers (secondary but useful) which suggests some threading related good practices.
The severity of issues in both packages can be configured but i recommend that initially the severity level is set to informational or warning, to not be obtrusive.
Add them either per project as needed, or via global configuration (i.e. analyzers.props)