StyleChecker 2.0.0-alpha

This is a prerelease version of StyleChecker.
There is a newer version of this package available.
See the version list below for details.
dotnet add package StyleChecker --version 2.0.0-alpha
NuGet\Install-Package StyleChecker -Version 2.0.0-alpha
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="StyleChecker" Version="2.0.0-alpha">
  <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 StyleChecker --version 2.0.0-alpha
#r "nuget: StyleChecker, 2.0.0-alpha"
#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 StyleChecker as a Cake Addin
#addin nuget:?package=StyleChecker&version=2.0.0-alpha&prerelease

// Install StyleChecker as a Cake Tool
#tool nuget:?package=StyleChecker&version=2.0.0-alpha&prerelease

StyleChecker

StyleChecker is yet another code style checker and refactoring tool like FxCopAnalyzers, StyleCop Analyzers, SonarLint, Roslynator, and so on. It uses the .NET Compiler Platform ("Roslyn") to analyze the C# source code of .NET Core projects and outputs diagnostics of a rule violation, and when running with Visual Studio it provides code fixes as much as possible. Note that StyleChecker contains only supplemental or niche analyzers, so it is intended to be used together with other Roslyn analyzers.

Get started

StyleChecker is available as the NuGet-logo NuGet package.

Install StyleChecker to your project with Visual Studio

  1. Open Package Manager Console. (Open your project with Visual Studio, and select Tools ➜ NuGet Package Manager ➜ Package Manager Console.)
  2. Enter the command Install-Package StyleChecker in the Package Manager Console.
  3. Set all to the PrivateAssets property. (Open Solution Explorer and select your project ➜ Dependencies ➜ NuGet ➜ Click StyleChecker with a right button to open StyleChecker Package Properties, and then enter all to the PrivateAssets field.)

Install StyleChecker to your project with .NET Core CLI

  1. Enter the command dotnet add package StyleChecker with the console.
  2. Open your project file (.csproj) using a text editor like Visual Studio Code.
  3. Fix the PackageReference element in the project file adding the PrivateAssets attribute with the all value as follows:
<PackageReference Include="StyleChecker" Version="..." PrivateAssets="all" />

Diagnostics

See the list of diagnostics.

Customize configuration

Some analyzers can be customized to change their behaviors, placing the configuration file StyleChecker.xml at the project root. The XML Schema Definition file config.v1.xsd of the configuration file and a sample of the configuration file are provided in the directory StyleChecker/StyleChecker/nuget/samples/ of the source tree (or in ~/.nuget/packages/stylechecker/VERSION/samples/ if you installed StyleChecker with the NuGet package). Note that StyleChecker does not use the XML Schema Definition file, but it helps you edit StyleChecker.xml with the text editor that is able to validate XML documents (for example, Visual Studio IDE, Visual Studio Code, and so on).

Create your own StyleChecker.xml file and place it at your project root, and add the AdditionalFiles element to .csproj file in your project as follows:

<ItemGroup>
  <AdditionalFiles Include="StyleChecker.xml" />
</ItemGroup>

Alternatively, with Visual Studio you can set "C# analyzer additional file" to Build Action property (This property can be changed from Solution Explorer ➜ Right Click on the StyleChecker.xml ➜ Properties ➜ Advanced ➜ Build Action).

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • 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.0.0 97 5/17/2024
2.0.0-beta 70 5/13/2024
2.0.0-alpha 62 5/11/2024
1.0.27 19,621 8/18/2020
1.0.26 533 6/16/2020
1.0.25 1,134 3/28/2020
1.0.24 1,322 6/24/2019
1.0.23 947 5/15/2019
1.0.22 840 4/7/2019
1.0.21 644 3/15/2019
1.0.20 815 2/19/2019
1.0.19 652 2/3/2019
1.0.18 878 1/18/2019
1.0.17 803 12/8/2018
1.0.16 724 11/30/2018
1.0.15 759 11/22/2018
1.0.14 769 11/3/2018
1.0.13 743 10/31/2018
1.0.12 765 10/26/2018
1.0.11 737 10/23/2018
1.0.10 697 10/21/2018
1.0.9 775 10/14/2018
1.0.8 754 10/5/2018
1.0.7 756 9/24/2018
1.0.6 797 9/7/2018
1.0.5 810 9/2/2018
1.0.4 812 8/30/2018
1.0.3 837 8/13/2018
1.0.2 853 7/25/2018
1.0.1 819 7/24/2018
1.0.0 840 7/24/2018