Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

madsstorm/CodeAnalyzers.Episerver

Repository files navigation

Code analyzers for Episerver

Build Status Quality Gate Status Nuget

Analyzes your code for Episerver best practices

Intro

Code analyzers for Episerver are Roslyn based analyzers that look for Episerver CMS and Commerce best practices and produce warnings ("squiggles") in Visual Studio as you type. The analyzers are installed per-project via a NuGet package, and are also executed by build servers.

Examples

Code Problem Severity
[ContentType(DisplayName="...")] Missing GUID
[Display(Name="...")] Missing Description ⚠️
DataFactory.Instance Legacy type ⚠️
ApprovalDB.SaveAsync() Internal type ⚠️
public class Block : BlockData
{
    public virtual ContentArea ...
ContentArea
in Block
ℹ️

See all analyzer rules

Install

Install-Package CodeAnalyzers.Episerver

Available at nuget.episerver.com

Configure

Analyzer rule severity can be configured in a ruleset file.

Compatibility

vs2019 Visual Studio 2019

vs2017 Visual Studio 2017 (15.5)+

compiler .NET Compiler Platform 2.6.1+