Roslynator Documentation

repository·main·Indexed 25 days ago

https://github.com/dotnet/roslynator

A 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.

Tokens
9.4K
Snippets
20
Records
79
Agent score
85%

What's inside Roslynator

  1. Explore Roslynator Analyzers, Refactorings, and Fixes

    main

    Roslynator 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.
  2. Use the Roslynator Command Line Tool

    main

    The Roslynator.CommandLine tool 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/cli
  3. Explore Roslynator.CSharp.Workspaces API Reference

    main

    The Roslynator.CSharp.Workspaces library 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/ref
  4. Explore Roslynator Analyzers

    main
    Roslynator 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.
  5. Choose the right Roslynator product

    main

    Depending 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.
  6. Use Roslynator Analyzers via NuGet

    main
    Note 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 is Roslynator.Analyzers.