Roslynator Documentation
repository·main·Indexed 25 days ago
https://github.com/dotnet/roslynatorA collection of 500+ analyzers, refactorings, and fixes for C# powered by the Roslyn compiler platform. Roslynator provides tools via NuGet packages (such as Roslynator.Analyzers and Roslynator.Formatting.Analyzers), IDE extensions for Visual Studio and VS Code, and a command-line tool. It also offers client libraries for custom development (Roslynator.Core, Roslynator.CSharp) and a testing framework for unit testing custom analyzers and refactorings.
What's inside Roslynator
- Roslynator Refactorings provides a collection of over 300 refactorings and fixes for C#, built on top of the Roslyn compiler platform. It is designed to improve code quality and developer productivity through automated code transformations.
Explore Roslynator products
mainRoslynator is available in several forms depending on your development environment:
- Visual Studio 2022: Roslynator for Visual Studio 2022
- VS Code: Roslynator for VS Code
- CLI: Roslynator Command-line Tool
- Testing: Roslynator Testing Framework (for xUnit)
Explore Roslynator Analyzers, Refactorings, and Fixes
mainRoslynator provides over 500 tools for C# development. You can browse the specific capabilities through the following documentation links:
- Analyzers: A list of all available code analyzers.
- Refactorings: A list of available code refactorings.
- Code Fixes: A list of code fixes available for CS diagnostics.
Use Roslynator.Workspaces.Core
mainTheRoslynator.Workspaces.Corepackage provides extended functionality forMicrosoft.CodeAnalysis.Workspaces.Common. It is designed to be used as an extension to the standard Microsoft Roslyn workspace APIs.Explore Roslynator Formatting Analyzers
mainRoslynator.Formatting.Analyzers provides a collection of code formatting analyzers for C#. You can find detailed documentation, a complete list of available analyzers, and usage guidance at the official Roslynator documentation site.Use the Roslynator Command Line Tool
mainThe
Roslynator.CommandLinetool provides a command-line interface for running Roslynator analyzers and refactorings on your C# code. You can use it to perform static analysis, run code fixes, and manage code quality via the CLI. Detailed documentation and command references are available at the official documentation site.https://josefpihrt.github.io/docs/roslynator/cliExplore related Roslynator products
mainDepending on your workflow, you may want to use other Roslynator distributions:
- Visual Studio 2022: Roslynator for Visual Studio 2022
- VS Code: Roslynator for VS Code
- CLI: Roslynator Command-line Tool
- Testing: Roslynator Testing Framework
Explore Roslynator.CSharp.Workspaces API Reference
mainThe
Roslynator.CSharp.Workspaceslibrary provides workspace-based analyzers and refactorings for C#. You can find the complete API reference and documentation for the available analyzers and refactorings at the official Roslynator documentation site.https://josefpihrt.github.io/docs/roslynator/refExplore Roslynator Code Analysis Analyzers
mainRoslynator provides a comprehensive set of code analysis analyzers for C#. You can find the full list of available analyzers, including their descriptions and how they function, in the official documentation.
https://josefpihrt.github.io/docs/roslynator/analyzersExplore Roslynator Analyzers
mainRoslynator provides a comprehensive set of analyzers for C# to improve code quality, detect potential bugs, and suggest modern language features. You can find detailed documentation, a full list of available analyzers, and usage guidance at the official Roslynator documentation site.Choose the right Roslynator product
mainDepending on your needs, you can use different versions of Roslynator:
- Roslynator 2019 (VS Extension): A full suite containing all features, including analyzers, refactorings, and code fixes for CS diagnostics.
- Roslynator.Analyzers (NuGet Package): A specialized package that contains only the analyzers.
- Roslynator for Visual Studio Code: A version specifically for the VS Code environment.
Use Roslynator Analyzers via NuGet
mainNote that analyzers are being removed from the Roslynator Visual Studio extension in upcoming major releases. To ensure your projects continue to use Roslynator's analysis capabilities, you should install the dedicated Roslynator NuGet packages directly into your projects. The primary package for this purpose isRoslynator.Analyzers.