Към всички skills

add-analyzer

dotnet · Тестване

Use when adding a new RCS#### diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator_* EditorConfig options, or when docs say CHANGELOG.md, XunitDiagnosticVerifier, or analyzers-testing.md — those are wrong for in-repo contribution.

Оригинален текст · няма потвърден превод на български

Теми: csharp · dotnet · roslyn · visual-studio

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
3481
Лиценз
NOASSERTION
Последна проверка на записа
22.09.2026 г.

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add dotnet/roslynator

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

Add Analyzer

Overview

Roslynator analyzers are metadata-driven: edit Analyzers.xml, codegen, implement analyzer + code fix, test, changelog. New analyzers never set <Status> — only IsEnabledByDefault.

When to Use

  • New RCS0 / RCS1 / RCS9 rule requested in an approved issue
  • Analyzer needs a new or existing roslynator_* config option
  • Picking package: RCS0 → Formatting, RCS1 → Analyzers, RCS9 → CodeAnalysis.Analyzers

Not for: deprecating rules (deprecate-analyzer-or-refactoring), bug fixes (fix-analyzer-bug), refactorings (add-refactoring).

Gate: CONTRIBUTING.md requires an approved GitHub issue before implementation.

Read this skill and references/implementation.md before writing tests. Published analyzers-testing.md targets NuGet consumers — copying it produces code that does not compile in this repo.

Confirm metadata parameters (hard gate)

STOP. Do NOT edit Analyzers.xml, run codegen, or implement until the user has confirmed every required parameter below. Do not invent defaults when the user (or issue) did not state them.

Use AskQuestion when available; otherwise ask conversationally. Batch related choices.

ParameterRequired?Allowed / notes
IdproposeCompute next free RCS0 / RCS1 / RCS9 id from Analyzers.xml; do not ask unless the issue conflicts or multiple ids are plausible
IdentifieryesPascalCase; drives generated names
TitleyesShort description
DefaultSeverityyesHidden, Info, Warning, or Error — always ask
IsEnabledByDefaultyestrue / false — always ask (RCS0 often false)
MessageFormatif message has {n} placeholdersOtherwise omit (same as Title)
Code fix?yesStrongly recommended; confirm yes/no
SupportsFadeOut / fade-out analyzernoAsk only if unused-code style
MinLanguageVersionnoAsk only if C# version-gated
Config optionnoSee config-options.md

When proposing Id, state the chosen value in your plan/summary (e.g. “using next free RCS9012”). Skip asking other parameters only when the approved issue or the user's message already states the value explicitly.

Quick Reference

Целият SKILL.md в GitHub