NDepend Default Rules for .NET

Every new NDepend project comes with 235 rules, 22 quality gates and 136 code queries and trend metrics, checked on your C# and .NET code in Visual Studio, in CI and in reports. Each one is a few lines of CQLinq (C# LINQ over the code model) that you can read and adapt. Each page below gives the description, how to fix the issues, and the full CQLinq source. Prefer to browse and search interactively? Use the Rules Explorer.

Quality Gates (19)

Hot Spots (7)

Code Smells (10)

Code Smells Regression (9)

Object Oriented Design (14)

Design (16)

Architecture (13)

API Breaking Changes (9)

Code Coverage (15)

Dead Code (5)

Security (39)

Visibility (12)

Immutability (15)

Naming Conventions (23)

Source Files Organization (6)

.NET Framework Usage

System (12)

System.Collections (4)

System.Runtime.InteropServices (3)

System.Threading (6)

System.Xml (2)

System.Globalization (1)

System.Reflection (3)

Microsoft.Contracts (1)

API Usage

Unity (9)

Defining JustMyCode (7)

Trend Metrics

Issues (11)

Rules (3)

Quality Gates (3)

Debt (7)

Code Size (22)

Maximum and Average (15)

Coverage (12)

Third-Party Usage (6)

Code Diff Summary (25)

Statistics (13)

Samples of Custom rules

Check Architecture (10)

Check Coverage on particular Code Elements (4)

Custom Naming Conventions (2)