Loic.DotNetAnalyzers.StyleCopAnalyzers 1.0.0

dotnet add package Loic.DotNetAnalyzers.StyleCopAnalyzers --version 1.0.0
                    
NuGet\Install-Package Loic.DotNetAnalyzers.StyleCopAnalyzers -Version 1.0.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="Loic.DotNetAnalyzers.StyleCopAnalyzers" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Loic.DotNetAnalyzers.StyleCopAnalyzers" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Loic.DotNetAnalyzers.StyleCopAnalyzers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Loic.DotNetAnalyzers.StyleCopAnalyzers --version 1.0.0
                    
#r "nuget: Loic.DotNetAnalyzers.StyleCopAnalyzers, 1.0.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.
#:package Loic.DotNetAnalyzers.StyleCopAnalyzers@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Loic.DotNetAnalyzers.StyleCopAnalyzers&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Loic.DotNetAnalyzers.StyleCopAnalyzers&version=1.0.0
                    
Install as a Cake Tool

StyleCop Analyzers for the .NET Compiler Platform

NuGetNuGet Beta

Join the chat at https://gitter.im/DotNetAnalyzers/StyleCopAnalyzers

Build status

codecov.io

This repository contains an implementation of the StyleCop rules using the .NET Compiler Platform. Where possible, code fixes are also provided to simplify the process of correcting violations.

Using StyleCop.Analyzers

The preferable way to use the analyzers is to add the nuget package StyleCop.Analyzers to the project where you want to enforce StyleCop rules.

The severity of individual rules may be configured using rule set files in Visual Studio 2015 or newer. Settings.StyleCop is not supported, but a stylecop.json file may be used to customize the behavior of certain rules. See Configuration.md for more information.

For documentation and reasoning on the rules themselves, see the Documentation.

For users upgrading from StyleCop Classic, see KnownChanges.md for information about known differences which you may notice when switching to StyleCop Analyzers.

C# language versions

Not all versions of StyleCop.Analyzers support all features of each C# language version. The table below shows the minimum version of StyleCop.Analyzers required for proper support of a C# language version.

C# version StyleCop.Analyzers version Visual Studio version
1.0 - 6.0 v1.0.2 or higher VS2015+
7.0 - 7.3 v1.1.0-beta or higher VS2017+
8.0 v1.2.0-beta or higher VS2019

Installation

StyleCopAnalyzers can be installed using the NuGet command line or the NuGet Package Manager in Visual Studio 2015.

Install using the command line:

Install-Package StyleCop.Analyzers

Install using the package manager: Install via nuget

Team Considerations

If you use older versions of Visual Studio in addition to Visual Studio 2015 or Visual Studio 2017, you may still install these analyzers. They will be automatically disabled when you open the project back up in Visual Studio 2013 or earlier.

Contributing

See Contributing

Current status

An up-to-date list of which StyleCop rules are implemented and which have code fixes can be found here.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.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
1.0.0 0 7/31/2021