How dotnet/roslynator works
Roslynator is a Roslyn-based C# analysis toolkit: analyzers report diagnostics, while IDE integrations expose refactorings and compiler-diagnostic fixes; analyzer packages are distributed separately. The repository also contains a CLI and reusable Roslyn client/workspace services. The principal workflow is source analysis in an editor, diagnostic/refactoring discovery, then a code fix or refactoring applied to the document. Some branches are represented by their exact enclosing source directories because individual implementations were not sampled; relationships without direct evidence are omitted.
Main entry points: Analysis C# analyzers · CSharpSyntaxFactsService.cs C# syntax service · ISyntaxFactsService.cs Syntax facts contract · AddParagraphToDocumentationCommentAnalyzer.cs Documentation analyzer
Components 23
Code analysis
- C# analyzers
src/Analyzers/CSharp/Analysis - Documentation analyzer
src/Analyzers/CSharp/Analysis/AddParagraphToDocumentationCommentAnalyzer.cs - Analyzer code fixes
src/Analyzers.CodeFixes/CSharp/CodeFixes - Documentation fix
src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParagraphToDocumentationCommentCodeFixProvider.cs - Formatting analyzers
src/Formatting.Analyzers
Editor features
- Compiler diagnostic fixes
src/CodeFixes/CSharp/CodeFixes - C# refactorings
src/Refactorings/CSharp/Refactorings - Extract event handler
src/Refactorings/CSharp/Refactorings/ExtractEventHandlerMethodRefactoring.cs - Visual Studio integration
src/VisualStudio - VS Code integration
src/VisualStudioCode/package/src/extension.ts
Command line
- CLI entry point
src/CommandLine/Program.cs - CLI commands
src/CommandLine/Commands
Client libraries
- Syntax facts contract
src/Workspaces.Core/ISyntaxFactsService.cs - C# syntax service
src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs - VB syntax service
src/VisualBasic.Workspaces/VisualBasic/VisualBasicSyntaxFactsService.cs - Code metrics
src/Workspaces.Core/CodeMetrics/CodeMetricsService.cs - C# metrics
src/CSharp.Workspaces/CSharp/CodeMetrics/CSharpCodeMetricsService.cs - Spelling services
src/Workspaces.Core/Spelling/SpellingService.cs - C# spelling
src/CSharp.Workspaces/CSharp/Spelling/CSharpSpellingService.cs - Roslyn core helpers
src/Core
Other components
- Developer
- IDE / editor
- C# source
Connections 19
- Developer → IDE / editor: edits in
README.md - IDE / editor → C# source: provides
README.md - C# source → C# analyzers: analyzed by
- C# analyzers → Documentation analyzer: includes
src/Analyzers/CSharp/Analysis/AddParagraphToDocumentationCommentAnalyzer.cs - Documentation analyzer → Documentation fix: diagnostic fixed by
src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParagraphToDocumentationCommentCodeFixProvider.cs - C# analyzers → Analyzer code fixes: diagnostics offered to
src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParagraphToDocumentationCommentCodeFixProvider.cs - C# source → C# refactorings: refactored in
- C# refactorings → Extract event handler: includes
src/Refactorings/CSharp/Refactorings/ExtractEventHandlerMethodRefactoring.cs - IDE / editor → Compiler diagnostic fixes: offers fixes
README.md - IDE / editor → Visual Studio integration: integrates through
README.md - IDE / editor → VS Code integration: integrates through
README.md - Developer → CLI entry point: runs
README.md - CLI entry point → CLI commands: dispatches
src/CommandLine/Program.cs - Syntax facts contract → C# syntax service: implemented by
src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs - Syntax facts contract → VB syntax service: implemented by
src/VisualBasic.Workspaces/VisualBasic/VisualBasicSyntaxFactsService.cs - Code metrics → C# metrics: implemented by
src/CSharp.Workspaces/CSharp/CodeMetrics/CSharpCodeMetricsService.cs - C# metrics → C# syntax service: uses syntax facts
src/CSharp.Workspaces/CSharp/CodeMetrics/CSharpCodeMetricsService.cs - Spelling services → C# spelling: extended by
src/CSharp.Workspaces/CSharp/Spelling/CSharpSpellingService.cs - C# spelling → C# syntax service: uses syntax facts
src/CSharp.Workspaces/CSharp/Spelling/CSharpSpellingService.cs