Skip to content

Repository files navigation

NuGet Package: Escendit.Tools.CodeAnalysis.StyleCopAnalyzers

This NuGet package leverages the power of StyleCop Analyzers to enforce code quality standards that are tailored to the organization's specific needs. By default, the package uses a set of analyzer rules that have been configured to align with the organization's coding practices, ensuring that our code is always compliant and maintainable.

Key features:

  • Utilize Roslyn .NET Analyzers for powerful and customizable code analysis
  • Defaults suited to the organization's coding practices
  • Ensures code compliance and maintainability

Installation

To install this package, use the NuGet Package Manager Console:

PM> Install-Package Escendit.Tools.CodeAnalysis.StyleCopAnalyzers

Or you can search for "Escendit.Tools.CodeAnalysis.StyleCopAnalyzers" in the NuGet Package Manager UI and install it from there.

Usage

After installing the package, the MSBuild and .editorconfig properties will be set automatically.

  • You can modify the MSBuild properties by updating the values in your .csproj or .vbproj file.
  • You can modify the .editorconfig properties by creating .editorconfig file and overriding the default values.

Configuration

The NuGet package includes the following default rules and severity levels:

RuleSeveritySeverity
SA0001error
SA0002error
SA1000error
SA1001error
SA1002error
SA1003error
SA1004error
SA1005error
SA1006error
SA1007error
SA1008error
SA1009error
SA1010error
SA1011error
SA1012error
SA1013error
SA1014error
SA1015error
SA1016error
SA1017error
SA1018error
SA1019error
SA1020error
SA1021error
SA1022error
SA1023error
SA1024error
SA1025error
SA1026error
SA1027error
SA1028error
SA1100error
SA1101none
SA1102error
SA1103error
SA1104error
SA1105error
SA1106error
SA1107error
SA1108error
SA1110error
SA1111error
SA1112error
SA1113error
SA1114error
SA1115error
SA1116error
SA1117error
SA1118error
SA1119error
SA1120error
SA1121error
SA1122error
SA1123error
SA1124error
SA1125error
SA1127error
SA1128error
SA1129error
SA1130error
SA1131error
SA1132error
SA1133error
SA1134error
SA1135error
SA1136error
SA1137error
SA1139error
SA1141error
SA1142error
SA1200error
SA1201error
SA1202error
SA1203error
SA1204error
SA1205error
SA1206error
SA1207error
SA1208error
SA1209error
SA1210error
SA1211error
SA1212error
SA1213error
SA1214error
SA1216error
SA1217error
SA1300none
SA1302error
SA1303error
SA1304error
SA1305error
SA1306error
SA1307error
SA1308error
SA1309none
SA1310error
SA1311error
SA1312error
SA1313error
SA1314error
SA1316error
SA1400error
SA1401error
SA1402error
SA1403error
SA1404error
SA1405error
SA1406error
SA1407error
SA1408error
SA1410error
SA1411error
SA1412error
SA1413error
SA1414error
SA1500error
SA1501error
SA1502error
SA1503error
SA1504error
SA1505error
SA1506error
SA1507error
SA1508error
SA1509error
SA1510error
SA1511error
SA1512error
SA1513error
SA1514error
SA1515error
SA1516error
SA1517error
SA1518error
SA1519error
SA1520error
SA1600error
SA1601error
SA1602error
SA1604error
SA1605error
SA1606error
SA1607error
SA1608error
SA1609error
SA1610error
SA1611error
SA1612error
SA1613error
SA1614error
SA1615error
SA1616error
SA1617error
SA1618error
SA1619error
SA1620error
SA1621error
SA1622error
SA1623error
SA1624error
SA1625error
SA1626error
SA1627error
SA1628error
SA1629error
SA1633none
SA1634error
SA1635error
SA1636error
SA1637error
SA1638error
SA1639error
SA1640error
SA1641error
SA1642error
SA1643error
SA1648error
SA1649error
SA1651error
SX1101error
SX1309error
SX1309Serror

To modify the severity level of a rule, you can add the following code to your .editorconfig file:

# dotnet_diagnostic.<Rule>.severity = <Severity>

For example, to change the severity level of SA9999 to "error", add the following line to your .editorconfig file:

# dotnet_diagnostic.SA9999.severity = error

Contributing

If you find a bug or have a feature request, please create an issue in the GitHub repository.

To contribute code, fork the repository and submit a pull request. Please ensure that your code follows the project's coding standards and is thoroughly tested.

License

Licensed under Apache License 2.0. See the LICENSE file for the complete license text.

About

StyleCop Analyzers Defaults

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors