Eternet.Analyzers.Contracts
1.0.14
Prefix Reserved
dotnet add package Eternet.Analyzers.Contracts --version 1.0.14
NuGet\Install-Package Eternet.Analyzers.Contracts -Version 1.0.14
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="Eternet.Analyzers.Contracts" Version="1.0.14" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eternet.Analyzers.Contracts" Version="1.0.14" />
<PackageReference Include="Eternet.Analyzers.Contracts" />
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 Eternet.Analyzers.Contracts --version 1.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Eternet.Analyzers.Contracts, 1.0.14"
#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 Eternet.Analyzers.Contracts@1.0.14
#: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=Eternet.Analyzers.Contracts&version=1.0.14
#tool nuget:?package=Eternet.Analyzers.Contracts&version=1.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Eternet.Analyzers.Contracts
Eternet.Analyzers.Contracts contains Roslyn analyzers for high-confidence public-contract modeling issues.
Current diagnostics:
EANC001: externally visible public-contract property usesstringfor a closed-set concept candidate such asType,Status,Severity,Role,Format, orScheme. The diagnostic emits remediation metadata such asConceptToken,CandidateConfidence,EvidenceKind,SuggestedAction,ObservedValues,SerializationRisk, andOpenSetRiskso eac can distinguish high-confidence enum migrations from evidence-gathering work.EANC002: externally visible public-contract property usesstringfor a numeric concept candidate such asCount,Index,Duration,Position,SourcePort,EthPort, orSlot. Identifier-like values ending inNumber, such as phone or ticket numbers, are string-preserving.EANC003: externally visible public-contract property usesstringfor a value the code derives from structured parsing or segmentation, such as split segments, substrings, or regex capture groups. Raw string-preserving members such asData,Content,Raw, orValueare not reported as structured concepts.EANC004: publicDomainResultresponse wraps a single DTO-shaped model instead of exposing the response surface directlyEANC005: public contract surface references server/runtime infrastructure such as EF Core, ASP.NET hosting, relational framework, Marten, or Npgsql typesEANC006: large composable reads should use query services or OData instead of materialized public contract responsesEANC007: externally visible public-contract property usesstringfor a temporal scalar such asTimeout,Duration,Interval, orRetentionwithout an explicit transport unit; expose a numeric member with a unit suffix and convert provider-specific duration formats internallyEANC008: publicDomainResultresponse wrapper can be flattened safely after source DTO and known reference rewrites are proven complete- Code fix: replace the wrapped DTO property with copied DTO properties, rewrite supported
Response.Wrapped.Memberreads and object initializers, and remove the wrapped type declaration when all references are covered by the rewrite plan. - Mutation endpoint responses (
IEndpointCreate,IEndpointUpdate,IEndpointDelete,IEndpointUpsert, andIApi*equivalents) are not considered deterministic flattening candidates. The analyzer keepsEANC004withendpointKind,wrappedCollectionMembers, andunsupportedReason=mutation_response_requires_endpoint_specific_surfaceso remediation authors define a command-specific response surface instead of copying a read DTO wholesale.
- Code fix: replace the wrapped DTO property with copied DTO properties, rewrite supported
EANC009: public endpoint request wrapper can be flattened safely after source model and known reference rewrites are proven complete- Code fix: replace the wrapped request property with copied model properties, rewrite supported references, and remove the wrapped type declaration when safe.
EANC010: contracts project namespaces must match the contracts project name exactly. The diagnostic properties includeExpectedNamespace,ActualNamespace,ProjectName,contractAssemblyName, andrecommendedAction. The code fix is intentionally treated as experimental outside a disposable worktree because namespace rewrites can require closed-solution reference and collision checks.EANC011: public contractRequestdeclarations in contracts projects should not keep redundantpartialwhen they have a single editable declaration and no same-assembly companion partial. The diagnostic properties includecontractSurface,requestType,contractAssemblyName,declarationCount,hasCompanionPartial,recommendedAction, andreason.- Code fix: remove only the
partialtoken from the reportedRequestdeclaration and preservepartialon any containing endpoint type.
- Code fix: remove only the
EANC012: public Eternet.Mediator endpoint request, response, and reachable model contracts declared in an Api/Web runtime project should move to the deterministic.Contractsproject. The diagnostic emitssourceProjectName,targetContractsProjectName,targetContractsNamespace,contractKind,contractSurfaceReason,contractMoveKind, andrecommendedActionso EAC can plan a repository-scoped move.EANC900: informational contract inventory signal for deterministic public contract surfaces; gated off by default and intended to be enabled only for PR-changed files witheternet_contract_inventory_enabled = true
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.