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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.
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,573 | 8/20/2022 |
2.5.9 | 1,288 | 7/29/2022 |
2.5.8 | 1,363 | 2/17/2022 |
2.5.7 | 1,438 | 1/21/2022 |
2.5.6 | 1,169 | 9/13/2021 |
2.5.5 | 1,105 | 9/1/2021 |
2.5.4 | 1,134 | 8/30/2021 |
2.5.3 | 1,117 | 8/29/2021 |
2.5.2 | 1,307 | 8/26/2021 |
2.5.1 | 1,166 | 8/24/2021 |
2.5.0 | 1,169 | 8/22/2021 |
2.4.0 | 991 | 7/31/2021 |
2.3.1 | 1,096 | 7/28/2021 |
2.3.0 | 1,184 | 7/23/2021 |
2.2.3 | 1,212 | 7/20/2021 |
2.2.2 | 1,191 | 7/20/2021 |
2.2.1 | 1,183 | 7/19/2021 |
2.2.0 | 1,203 | 7/18/2021 |
2.1.0 | 1,200 | 7/15/2021 |
2.0.4 | 1,104 | 7/14/2021 |
2.0.3 | 1,169 | 7/13/2021 |
2.0.2 | 1,199 | 7/12/2021 |
2.0.1 | 1,358 | 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.