Meridian.Analyzer 0.2.6

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

Meridian.Analyzer

Meridian.Analyzer is a Roslyn analyzer package for ASP.NET Core codebases with opinionated readability, architecture, security, reliability, and performance rules.

Quick Start

Install the published analyzer package into a 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

Package Facts

  • 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

Local Checks

  • 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

Run these from this repo before publishing or sending a change for review.

Configure Severity

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

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

You can enable as many or as few rules as you want. Each rule doc explains what it reports and how to refactor away from it.

Notes

  • nuget.org is a public feed.
  • 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 usage MER0003 Security Remove [OutputCache] or replace it with no-store caching unless you have a clearly safe cache policy
Missing explicit controller policy MER0004 Security Declare class-level or action-level policies on admin and high-risk controllers
Admin controller shape mismatch MER0005 Security Align admin controllers on Admin*Controller, api/admin, and AdminControllerBase
Controller service location MER0006 Architecture Use constructor injection or [FromServices] instead of action-body service location
Raw configuration reads 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
Missing controller cancellation token MER0009 Reliability Add CancellationToken to async actions and avoid CancellationToken.None in request code
Direct time and delay APIs MER0010 Reliability Use a clock abstraction 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
Layering violations MER0013 Architecture Move dependencies back to the intended layer
Model ownership drift MER0014 Architecture Keep DTOs feature-local and entities in dedicated entity folders
String helper usage MER0015 Readability Use shared string helpers in in-memory code
Ad hoc JSON options 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 outside persistence code MER0018 Security Keep SQL in persistence code and prefer interpolated APIs over raw APIs
Direct ProblemDetails construction MER0019 Reliability Use shared ProblemDetails helpers from controller actions
Controller data access MER0020 Architecture Delegate repository, DbContext, and EF work to services or facades
Non-Serilog runtime logging MER0021 Reliability Use Serilog in runtime code and keep framework logging at the edges
Direct Redis keyspace scans MER0022 Performance Route IServer.Keys scans through a dedicated bounded helper
Detached runtime tasks MER0023 Reliability Give background work an explicit lifetime, cancellation path, and observable failure path
Queryable string-extension predicates MER0024 Reliability Replace StringExtensions.IsNullOr* inside queryable or expression-returning methods with translatable query guards
Empty is-pattern braces 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 docs or maintainer flow 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.