luojun138 / CSharpCodingGuidelines

C# Coding guidelines as a Visual Studio nuget package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C# Coding Guidelines for VS2015

Build status NuGet Status

C# Coding guidelines is a Visual Studio 2015 analyzer nuget package which tries to follow the Coding Guidelines for C# as defined by Dennis Doomens.

If provides features such as:

  • Always check the result of an as operation
  • Avoid methods that take a bool flag
  • Don't allow methods and constructors with more than three parameters
  • Don't use if-else statements instead of a simple (conditional) assignment
  • Be reluctant with multiple return statements
  • Avoid nested loops
  • Don't make explicit comparisons to true or false
  • Only use var when the type is very obvious
  • Avoid conditions with double negatives
  • Methods should not exceed 7 statements

About

C# Coding guidelines as a Visual Studio nuget package

License:MIT License


Languages

Language:C# 96.9%Language:PowerShell 3.1%