PinguApps.CodeStyle.Analyzers
0.1.0
dotnet add package PinguApps.CodeStyle.Analyzers --version 0.1.0
NuGet\Install-Package PinguApps.CodeStyle.Analyzers -Version 0.1.0
<PackageReference Include="PinguApps.CodeStyle.Analyzers" Version="0.1.0" />
<PackageVersion Include="PinguApps.CodeStyle.Analyzers" Version="0.1.0" />
<PackageReference Include="PinguApps.CodeStyle.Analyzers" />
paket add PinguApps.CodeStyle.Analyzers --version 0.1.0
#r "nuget: PinguApps.CodeStyle.Analyzers, 0.1.0"
#:package PinguApps.CodeStyle.Analyzers@0.1.0
#addin nuget:?package=PinguApps.CodeStyle.Analyzers&version=0.1.0
#tool nuget:?package=PinguApps.CodeStyle.Analyzers&version=0.1.0
PinguApps.CodeStyle.Analyzers
PinguApps.CodeStyle.Analyzers is a small Roslyn analyzer package for PinguApps code style rules that need build-time enforcement.
Installation
Install the package into any project that should enforce the rules:
dotnet add package PinguApps.CodeStyle.Analyzers
NuGet automatically exposes analyzers from the package to the consuming project through PackageReference.
Rules
PACS0001: classes must not use primary constructors.
PACS0001 Class Primary Constructors
PACS0001 reports C# classes declared with primary constructors. Use an explicit constructor in classes instead. Records may continue to use primary constructors.
Invalid:
public class Widget(string name)
{
public string Name { get; } = name;
}
Valid:
public class Widget
{
public Widget(string name)
{
Name = name;
}
public string Name { get; }
}
Also valid:
public record Widget(string Name);
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 |
|---|---|---|
| 0.1.0 | 470 | 5/2/2026 |