Skip to main content

Roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Tools

Contributions

Contributions are welcome! If you are interested please see:

tip

Bugfixes or small improvements can be implemented right away. Larger task like adding new analyzer or refactoring should be discussed first.

Donations

Special thanks to:

  • .NET on AWS Open Source Software Fund for donating $6000.00 USD ($500.00 for 12 months starting November 2024).
  • Microsoft for donating $1000.00 USD.
  • Ian Kemp for donating $13.00 USD / month starting July 2021.

.NET Foundation

This project is supported by the .NET Foundation.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Command Line Tool

Run following command to install Roslynator command line tool:

dotnet tool install -g roslynator.dotnet.cli

See documentation for further information.

Testing Framework

  • Roslynator Testing Framework can be used for unit testing of analyzers, refactorings and code fixes.
  • Framework is distributed as NuGet package. NuGet
  • Learn how to use the framework from actual usages in Roslynator repo:
    • Tests of analyzers are here, here and here
    • Tests of refactorings are here
    • Tests of fixes of compiler diagnostics are here

.NET API

PackageVersionExtends
Roslynator.CoreNuGetMicrosoft.CodeAnalysis.Common
Roslynator.Workspaces.CoreNuGetMicrosoft.CodeAnalysis.Workspaces.Common
Roslynator.CSharpNuGetMicrosoft.CodeAnalysis.CSharp
Roslynator.CSharp.WorkspacesNuGetMicrosoft.CodeAnalysis.CSharp.Workspaces