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" />
                    
Directory.Packages.props
<PackageReference Include="Eternet.Analyzers.Contracts" />
                    
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 Eternet.Analyzers.Contracts --version 1.0.14
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Eternet.Analyzers.Contracts&version=1.0.14
                    
Install as a Cake Tool

Eternet.Analyzers.Contracts

Eternet.Analyzers.Contracts contains Roslyn analyzers for high-confidence public-contract modeling issues.

Current diagnostics:

  • EANC001: externally visible public-contract property uses string for a closed-set concept candidate such as Type, Status, Severity, Role, Format, or Scheme. The diagnostic emits remediation metadata such as ConceptToken, CandidateConfidence, EvidenceKind, SuggestedAction, ObservedValues, SerializationRisk, and OpenSetRisk so eac can distinguish high-confidence enum migrations from evidence-gathering work.
  • EANC002: externally visible public-contract property uses string for a numeric concept candidate such as Count, Index, Duration, Position, SourcePort, EthPort, or Slot. Identifier-like values ending in Number, such as phone or ticket numbers, are string-preserving.
  • EANC003: externally visible public-contract property uses string for a value the code derives from structured parsing or segmentation, such as split segments, substrings, or regex capture groups. Raw string-preserving members such as Data, Content, Raw, or Value are not reported as structured concepts.
  • EANC004: public DomainResult response wraps a single DTO-shaped model instead of exposing the response surface directly
  • EANC005: public contract surface references server/runtime infrastructure such as EF Core, ASP.NET hosting, relational framework, Marten, or Npgsql types
  • EANC006: large composable reads should use query services or OData instead of materialized public contract responses
  • EANC007: externally visible public-contract property uses string for a temporal scalar such as Timeout, Duration, Interval, or Retention without an explicit transport unit; expose a numeric member with a unit suffix and convert provider-specific duration formats internally
  • EANC008: public DomainResult response 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.Member reads 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, and IApi* equivalents) are not considered deterministic flattening candidates. The analyzer keeps EANC004 with endpointKind, wrappedCollectionMembers, and unsupportedReason=mutation_response_requires_endpoint_specific_surface so remediation authors define a command-specific response surface instead of copying a read DTO wholesale.
  • 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 include ExpectedNamespace, ActualNamespace, ProjectName, contractAssemblyName, and recommendedAction. 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 contract Request declarations in contracts projects should not keep redundant partial when they have a single editable declaration and no same-assembly companion partial. The diagnostic properties include contractSurface, requestType, contractAssemblyName, declarationCount, hasCompanionPartial, recommendedAction, and reason.
    • Code fix: remove only the partial token from the reported Request declaration and preserve partial on any containing endpoint type.
  • EANC012: public Eternet.Mediator endpoint request, response, and reachable model contracts declared in an Api/Web runtime project should move to the deterministic .Contracts project. The diagnostic emits sourceProjectName, targetContractsProjectName, targetContractsNamespace, contractKind, contractSurfaceReason, contractMoveKind, and recommendedAction so 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 with eternet_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.

Version Downloads Last Updated
1.0.14 127 5/13/2026
1.0.13 114 5/13/2026
1.0.12 112 5/9/2026
1.0.11 117 5/9/2026
1.0.10 118 5/8/2026
1.0.9 105 5/7/2026
1.0.8 104 5/7/2026
1.0.7 104 5/6/2026
1.0.6 103 5/4/2026
1.0.5 110 5/3/2026
1.0.4 103 4/30/2026
1.0.3 115 4/30/2026