EricksonLopez.Pagination.Analyzers 0.0.0-alpha.0

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

EricksonLopez.Pagination.Analyzers

Roslyn analyzers for the EricksonLopez.Pagination ecosystem to ensure correctness, performance, and security when using cursor and keyset pagination.

Overview

This package contains diagnostic analyzers that run during compilation to detect common mistakes, anti-patterns, and security vulnerabilities related to pagination.

Installation

<PackageReference Include="EricksonLopez.Pagination.Analyzers" Version="[VERSION]" />

Note: The analyzers are a development dependency and will not be included as a runtime dependency in your published output.

Diagnostics

Diagnostic ID Severity Category Description
PAG002 Warning Usage Missing OrderBy before ToPagedListAsync. Standard offset pagination requires a deterministic sort order to prevent skipping or duplicating items across pages.
PAG003 Warning Usage Unexpected OrderBy before ToCursorPagedListAsync. Cursor pagination applies its own sorting based on the cursor configuration. Applying OrderBy beforehand causes conflicting sorts.
PAG004 Warning Usage OrderBy before Keyset(). Calling OrderBy before building a keyset causes duplicate ORDER BY clauses in the generated SQL. Use Keyset().Ascending() instead.
PAG005 Info Performance Consider using EricksonLopez.Pagination.SourceGenerators. Without the source generator, cursor decoding relies on runtime reflection, which is slower and incompatible with Native AOT.
PAG006 Warning Security ToCursorPagedListAsync called — verify HMAC encoder is configured. This warning fires on every call to ToCursorPagedListAsync because analyzers cannot detect DI configuration at compile time. Suppress with #pragma warning disable PAG006 if HmacCursorEncoder is already configured in AddPagination().
PAG007 Warning Performance KeysetBuilder has too many columns. Using more than 5 columns in a keyset generates complex SQL predicates that degrade query plan performance on databases that don't support row-value syntax. Use a composite tie-breaker instead.
PAG008 Warning Security Explicit use of insecure Base64CursorEncoder. Base64 cursor encoding is vulnerable to tampering and manipulation. Use HmacCursorEncoder with a secret key instead.

Suppression

If you intentionally want to ignore a diagnostic, you can suppress it using standard C# pragmas or in your .editorconfig:

#pragma warning disable PAG006 // I don't care about cursor tampering in this internal app
var paged = await query.ToCursorPagedListAsync(parameters);
#pragma warning restore PAG006
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
0.0.0-alpha.0 53 8/25/2026