Blowin.CleanCode 2.6.0

dotnet add package Blowin.CleanCode --version 2.6.0
NuGet\Install-Package Blowin.CleanCode -Version 2.6.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blowin.CleanCode" Version="2.6.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blowin.CleanCode --version 2.6.0
#r "nuget: Blowin.CleanCode, 2.6.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blowin.CleanCode as a Cake Addin
#addin nuget:?package=Blowin.CleanCode&version=2.6.0

// Install Blowin.CleanCode as a Cake Tool
#tool nuget:?package=Blowin.CleanCode&version=2.6.0

Introduction

BlowinCleanCode is a Roslyn-based C# code analyzer that aims to provide a set of rules that helps to simplify code and make it cleaner.

Changelog

Available analyses

Single responsibility

  • Method contain 'And'
  • Control flag
  • Long method
  • Cognitive complexity of the method
  • Many parameter in method
  • Method contains a lot of declaration
  • Too many chained references
  • Large class
  • Large number of fields in types
  • Lambda have too many lines

Encapsulation

  • Don't use public static field

Good practice

  • Don't return null
  • Don't use static class
  • Disposable member in non disposable class
  • Switch statements should have at least 2 case clauses
  • Finalizers should not be empty
  • Type that provide Equals should implement IEquatable
  • 'ThreadStatic" fields should not be initialized.
  • Name is too long
  • Use only ASCII characters for names

Code smell

  • Nested ternary operator
  • Complex condition
  • Magic value
  • Preserve whole object
  • Hollow type name
  • Deeply nested
  • Switch should not have a lot of cases
  • Switch statements should not be nested
  • Catch should do more than rethrow
  • Empty 'default' clauses should be removed
  • Middle man
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.6.0 2,227 8/20/2022
2.5.9 1,012 7/29/2022
2.5.8 1,176 2/17/2022
2.5.7 1,121 1/21/2022
2.5.6 896 9/13/2021
2.5.5 839 9/1/2021
2.5.4 892 8/30/2021
2.5.3 950 8/29/2021
2.5.2 1,017 8/26/2021
2.5.1 912 8/24/2021
2.5.0 948 8/22/2021
2.4.0 804 7/31/2021
2.3.1 907 7/28/2021
2.3.0 926 7/23/2021
2.2.3 1,002 7/20/2021
2.2.2 907 7/20/2021
2.2.1 963 7/19/2021
2.2.0 901 7/18/2021
2.1.0 984 7/15/2021
2.0.4 876 7/14/2021
2.0.3 910 7/13/2021
2.0.2 976 7/12/2021
2.0.1 1,125 7/10/2021

Roslyn-based C# code analyzer that aims to provide a set of rules that helps to simplify code and make it cleaner.