ZkLink.Analyzers 1.0.3

dotnet add package ZkLink.Analyzers --version 1.0.3
                    
NuGet\Install-Package ZkLink.Analyzers -Version 1.0.3
                    
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="ZkLink.Analyzers" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZkLink.Analyzers" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="ZkLink.Analyzers" />
                    
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 ZkLink.Analyzers --version 1.0.3
                    
#r "nuget: ZkLink.Analyzers, 1.0.3"
                    
#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 ZkLink.Analyzers@1.0.3
                    
#: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=ZkLink.Analyzers&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=ZkLink.Analyzers&version=1.0.3
                    
Install as a Cake Tool

ZkLink.Analyzers

Roslyn diagnostics for secure and asynchronous ZkLink usage. The analyzer targets netstandard2.0 and has no runtime dependency on the ZkLink client.

Rules

ID Category Default Meaning
ZKL0001 Security Warning A nonempty compile-time password is passed to ZooKeeperAuthentication.Digest. Load secrets from configuration or a secret store.
ZKL0002 Security Warning AllowUnsafePlaintextDigest = true appears in client options. Use TLS outside controlled local development.
ZKL0003 Usage Warning A watch-producing call has its result discarded. Retain and dispose the watch or watched result.
ZKL0004 Usage Warning A client or watch Task/ValueTask call is not awaited or otherwise observed.
ZKL0005 Usage Warning An async call omits a CancellationToken available in the enclosing scope. Passing default explicitly is allowed.
ZKL0006 Usage Warning A direct ZkLink async call is blocked with .Result, .Wait(), or .GetAwaiter().GetResult(). Await it instead.

Diagnostics use ZkLink symbol matching and skip generated code. They intentionally check direct source patterns rather than interprocedural flow. Runtime validation remains authoritative.

No code fixes or automatic retries are supplied. Credential storage, watch ownership, cancellation, and uncertain request outcomes require application-specific decisions.

Use from this source checkout

Install the analyzer package for a consuming project with:

<PackageReference Include="ZkLink.Analyzers" Version="1.0.1" PrivateAssets="all" />

Reference the analyzer without loading it as a runtime library:

<ItemGroup>
  <ProjectReference
    Include="path/to/src/ZkLink.Analyzers/ZkLink.Analyzers.csproj"
    OutputItemType="Analyzer"
    ReferenceOutputAssembly="false" />
</ItemGroup>

The local package smoke test packs 0.0.0-local, restores a consumer from that package, compiles clean code, and verifies an intentional unobserved call reports ZKL0004:

bash dev/test-analyzers-package.sh

To escalate a rule in a consuming project:

dotnet_diagnostic.ZKL0004.severity = error

The release workflow checks a fresh package consumer, clean compilation and the intentional ZKL0004 diagnostic. Analyzers run in the compiler and add no ZkLink runtime dependency. This does not establish Native AOT support for application code.

There are no supported framework assets in this package.

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
1.0.3 50 11/7/2026
1.0.2 44 11/7/2026
1.0.1 55 11/7/2026