Atya.Governance.CodeQuality
1.0.0
dotnet add package Atya.Governance.CodeQuality --version 1.0.0
NuGet\Install-Package Atya.Governance.CodeQuality -Version 1.0.0
<PackageReference Include="Atya.Governance.CodeQuality" Version="1.0.0" />
<PackageVersion Include="Atya.Governance.CodeQuality" Version="1.0.0" />
<PackageReference Include="Atya.Governance.CodeQuality" />
paket add Atya.Governance.CodeQuality --version 1.0.0
#r "nuget: Atya.Governance.CodeQuality, 1.0.0"
#:package Atya.Governance.CodeQuality@1.0.0
#addin nuget:?package=Atya.Governance.CodeQuality&version=1.0.0
#tool nuget:?package=Atya.Governance.CodeQuality&version=1.0.0
CodeQuality
Reusable NuGet package for centralized code-quality policy across Atya repositories.
Purpose
This package provides one shared place for analyzer and coding-style configuration. Projects that reference it receive the same .NET analyzer settings, StyleCop settings, and selected StyleCop analyzer assemblies.
The package is intentionally explicit: it enables the analyzer rules documented by this policy, but it does not force broad AnalysisMode presets or XML documentation generation on consuming projects.
Contents
buildTransitive/Atya.Governance.CodeQuality.props- Enables SDK analyzers and wires shared config files into consuming projects.
buildTransitive/Atya.Governance.CodeQuality.globalconfig- Shared analyzer severities, naming rules, and code-style policy.
buildTransitive/stylecop.json- StyleCop-specific behavior, such as using placement and ordering behavior.
analyzers/dotnet/cs/*.dll- Repacked StyleCop analyzer assemblies.
docs/CODING_STYLE.md- Shared coding-style documentation.
Usage
Reference the package from a consuming project:
<PackageReference Include="Atya.Governance.CodeQuality" Version="1.0.0" PrivateAssets="all" />
The package uses buildTransitive, so the analyzer policy flows automatically into projects that reference it.
Use the shared repository .editorconfig alongside this package for formatting/editor behavior. If the same analyzer key is defined in both .editorconfig and this package's global analyzer config, the repository .editorconfig wins.
Policy scope
The package currently enforces:
- selected .NET analyzer/code-style rules, such as
nameof(...), unnecessarythis., predefined type keywords, readonly fields, and unused suppressions; - selected StyleCop rules for using placement/order, member/modifier ordering, braces/blank lines, accessibility modifiers, and naming;
- private/internal field prefixes (
_camelCase,s_camelCase) through .NET naming rules.
The package does not enforce StyleCop XML documentation/file-header rules by default.
Local development
When testing the package from this repository with a ProjectReference or a direct .props import, remember that this is not the same as consuming the packed NuGet package. A project reference does not automatically expose the package's analyzers/dotnet/cs assets.
For local analyzer demos, either:
- reference the packed
.nupkg, or - add
StyleCop.Analyzersdirectly to the sample project.
The shared stylecop.json file should still come from buildTransitive/Atya.Governance.CodeQuality.props.
To compile the intentionally wrong sample files and inspect diagnostics:
dotnet build samples/CodeQuality.Sample.Console/CodeQuality.Sample.Console.csproj -p:EnableWrongStyleExamples=true
Pack
dotnet pack -c Release
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 |
|---|---|---|
| 1.0.0 | 673 | 5/1/2026 |