Meridian.Analyzer 0.2.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Meridian.Analyzer --version 0.2.3
                    
NuGet\Install-Package Meridian.Analyzer -Version 0.2.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="Meridian.Analyzer" Version="0.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meridian.Analyzer" Version="0.2.3" />
                    
Directory.Packages.props
<PackageReference Include="Meridian.Analyzer" />
                    
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 Meridian.Analyzer --version 0.2.3
                    
#r "nuget: Meridian.Analyzer, 0.2.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 Meridian.Analyzer@0.2.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=Meridian.Analyzer&version=0.2.3
                    
Install as a Cake Addin
#tool nuget:?package=Meridian.Analyzer&version=0.2.3
                    
Install as a Cake Tool

Meridian.Analyzer

Meridian.Analyzer is a Roslyn analyzer package for backend readability, architecture, security, reliability, and performance rules.

Quick Start

Install the published analyzer package into a consumer project:

dotnet add package Meridian.Analyzer

Or add an explicit package reference:

<ItemGroup>
  <PackageReference Include="Meridian.Analyzer" Version="0.2.*" PrivateAssets="all" />
</ItemGroup>

Repository Layout

  • src/Meridian.Analyzer/: analyzer project, rule implementations, helpers, and Roslyn release tracking files
  • tests/Meridian.Analyzer.Tests/: analyzer behavior tests
  • docs/: maintainer guidance, examples, and per-rule documentation
  • LICENSE: MIT license for the repository and published package metadata

Documentation

Current Surface

  • Analyzer project: src/Meridian.Analyzer/Meridian.Analyzer.csproj
  • Test project: tests/Meridian.Analyzer.Tests/Meridian.Analyzer.Tests.csproj
  • Diagnostic prefix: MER
  • Category namespaces: Meridian.Readability, Meridian.Security, Meridian.Architecture, Meridian.Reliability, Meridian.Performance
  • Packaging status: published on nuget.org

Validation Entry Points

  • Local test run: dotnet test tests/Meridian.Analyzer.Tests/Meridian.Analyzer.Tests.csproj -c Release
  • Local package smoke check: dotnet pack src/Meridian.Analyzer/Meridian.Analyzer.csproj -c Release -o artifacts

Use dotnet test and dotnet pack from this repo to validate the standalone package itself.

Consumer Configuration

Configure analyzer severities in your consuming project's .editorconfig:

[*.cs]
dotnet_diagnostic.MER0001.severity = warning
dotnet_diagnostic.MER0002.severity = warning

You can enable only the rules you want. Each rule document describes the contract it enforces and the preferred refactor shape.

Risks And Current Boundaries

  • nuget.org is public. The current publish lane is fine for public distribution, but it is not a private feed.
  • Release automation depends on the NUGET_KEY GitHub secret. If that key rotates or loses push scope, the release workflow will fail at publish time.
  • Some rules encode opinionated architectural conventions. Review the rule docs before enabling large sets as build warnings in an existing codebase.

Current Rules

Rule Diagnostic ID Category Preferred refactor
Ternary in initializer payload branches MER0001 Readability Stage the payload branch in a named local or helper before building the initializer
Broad nested try/catch fallback flow MER0002 Readability Extract the inner fallback branch into a helper or flatten the exception-handling flow
Unsafe output-cache boundary MER0003 Security Remove [OutputCache] or replace it with no-store caching unless a persona-safe cache policy is reviewed
Controller authorization policy boundary MER0004 Security Declare class-level or action-level policies on admin and high-risk controllers
Admin controller shape contract MER0005 Security Align admin controllers on Admin*Controller, api/admin, and BaseAdminController
Controller service locator boundary MER0006 Architecture Use constructor injection or [FromServices] instead of action-body service location
Raw configuration read boundary MER0007 Reliability Move raw reads to typed options, startup guards, or provider adapters
Startup bypass flag containment MER0008 Security Move MERIDIAN_SKIP_* reads behind StartupGuards or typed startup-skip options
Controller cancellation boundary MER0009 Reliability Add CancellationToken to async actions and avoid CancellationToken.None in request code
Clock and deterministic delay boundary MER0010 Reliability Use IMeridianClock or TimeProvider for runtime time or delay work
Static mutable runtime state MER0011 Reliability Move static mutable state from controllers or handlers into injectable bounded services
Health-check registration parity MER0012 Reliability Register every source Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck through health-check registration
Backend layer-boundary guard MER0013 Architecture Move dependencies to the documented layer boundary
Model ownership boundary MER0014 Architecture Keep DTOs feature-local and entities in the database entity boundary
String helper usage MER0015 Readability Use shared string helpers in in-memory code
Shared JSON profile boundary MER0016 Architecture Move ad hoc JSON options into shared profiles or a named factory
Unbounded EF materialisation MER0017 Performance Add obvious Where, Take, or Skip bounds before async materialisation
Raw SQL boundary MER0018 Security Keep SQL in persistence boundaries and prefer interpolated APIs over raw APIs
ProblemDetails construction boundary MER0019 Reliability Use shared ProblemDetails helpers from controller actions
Controller data-access boundary MER0020 Architecture Delegate repository, DbContext, and EF work to services or facades
Backend logging contract MER0021 Reliability Use Serilog outside framework-edge boundaries
Redis keyspace scan boundary MER0022 Performance Route IServer.Keys scans through an approved bounded helper
Detached runtime task boundary MER0023 Reliability Give background work an owned lifetime, cancellation path, and observability boundary
IQueryable string-extension guard boundary MER0024 Reliability Replace StringExtensions.IsNullOr* predicates inside queryable or expression-returning methods with translatable query guards
Empty is-pattern brace guard boundary MER0025 Readability Replace empty property-pattern braces with shared nullable helpers or explicit null checks when behavior matches

Rule-Addition Checklist

Before landing MER0002+ or any later rule, update these surfaces in the same change:

  1. Analyzer implementation under src/Meridian.Analyzer/
  2. Positive and negative tests under tests/Meridian.Analyzer.Tests/
  3. Rule documentation under docs/rules/
  4. The rule index in this README.md
  5. docs/guide.md or docs/usage-example.md when the maintainer workflow changed
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in 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.4.1 120 6/16/2026
0.4.0 115 6/14/2026
0.3.0 101 6/13/2026
0.2.6 100 6/4/2026
0.2.5 101 6/4/2026
0.2.4 104 6/4/2026
0.2.3 107 6/4/2026
0.2.2 101 6/4/2026
0.2.1 101 6/4/2026

See CHANGELOG.md and GitHub releases for package and rule updates.