Roslynator
Roslynator is a set of code analysis tools for C#, powered by Roslyn.
Tools
- IDE extensions for:
- NuGet packages that contain a collection of analyzers
- Testing framework for unit-testing analyzers, refactorings, and code fixes
- .NET API that extends the Roslyn API
- Command line tool
Contributions
Contributions are welcome! See the developer docs, contributing with agent skills, and open issues.
Agent skills in the roslynator repo provide step-by-step workflows for bug fixes and new rules — and you can read them as plain contributor docs. Bugfixes or small improvements can be implemented right away. Larger tasks, such as adding a 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.
- @IanKemp for donating $13.00 USD / month starting July 2021.
- @Genbox for donating $5.00 USD / month starting October 2024.
- Timo Nürnberg for donating $5.00 USD / month starting March 2025.
.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
To install the CLI:
dotnet tool install -g roslynator.dotnet.cli
See the CLI documentation.
Testing Framework
- Use the testing framework to unit-test analyzers, refactorings, and code fixes.
- The framework is available as a NuGet package.
- Examples in the Roslynator repo:
- Analyzer tests: Analyzers.Tests, CodeAnalysis.Analyzers.Tests, and Formatting.Analyzers.Tests
- Refactoring tests: Refactorings.Tests
- Compiler diagnostic fix tests: CodeFixes.Tests
.NET API
- The .NET API extends Roslyn and is intended for building custom analyzers and refactorings.
- These packages do not include analyzers or refactorings.
- See reference documentation.
- See "How to use Roslynator .NET API"