meziantou-analyzer

Configures Meziantou.Analyzer rules and severities for .NET repositories via .editorconfig.

Updated May 2, 2026
One-click install
npx skills add https://github.com/hdeshev/pi-config --skill meziantou-analyzer-hdeshev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: meziantou-analyzer
Source: https://github.com/hdeshev/pi-config/tree/main/agent/skills/meziantou-analyzer
Command: npx skills add https://github.com/hdeshev/pi-config --skill meziantou-analyzer-hdeshev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Meziantou.Analyzer, and includes references (resource) components.

What problem does it solve? .NET teams often need broader static analysis coverage than the SDK baseline provides, but adding and tuning a large analyzer package without creating noisy or duplicate diagnostics is difficult. This Skill installs and configures the open-source Meziantou.Analyzer NuGet package with explicit, repo-owned severity rules. ## Core Features & Use Cases - Analyzer Bootstrap: Detects existing Meziantou.Analyzer references, adds the package to projects or shared props, and verifies with a build. - Severity Management: Keeps MAxxxx rule severities in the root .editorconfig with starter, library, application, and test-project presets. - Overlap Resolution: Identifies duplicate diagnostics with SDK analyzers, Roslynator, and StyleCop so only one rule stays active. - Use Case: A team wants one analyzer pack covering design, usage, security, performance, and style; the Skill adds Meziantou.Analyzer, configures severities, and validates with dotnet build. ## Quick Start Ask the agent to add Meziantou analyzers to the repository and configure rule severities in the root .editorconfig.

Frequently Asked Questions about meziantou-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Meziantou.Analyzer to a .NET project?▼

Run dotnet add PROJECT.csproj package Meziantou.Analyzer to add the analyzer package. Then configure rule severities in the root .editorconfig and verify with dotnet build.

How do I configure Meziantou.Analyzer rule severity in .editorconfig?▼

Set each rule with dotnet_diagnostic.MAxxxx.severity entries under a [*.cs] section, using none, suggestion, warning, or error. You can also set the whole category at once with dotnet_analyzer_diagnostic.category-Meziantou.severity.

Does Meziantou.Analyzer conflict with Roslynator or StyleCop?▼

Some rules overlap, such as RCS1197 with MA0020 and SA1649 with MA0048. The recommended approach is to pick one rule per overlap and disable the duplicate in .editorconfig to avoid double diagnostics.

When should I not use Meziantou.Analyzer?▼

Avoid it when the repository already enforces an overlapping analyzer baseline and does not want extra diagnostics, or for formatting-only work. In those cases the Skill returns status not_applicable.

How do I roll out Meziantou.Analyzer on an existing codebase?▼

Use a phased migration: start with all rules as suggestions, promote critical rules like MA0001 and MA0040 to warnings, then enforce security rules such as MA0014 and MA0035 as errors in CI.