# dotnet/roslynator

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/dotnet-roslynator).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

3,499 stars · 299 forks · C# · NOASSERTION

## Links

- GitHub: https://github.com/dotnet/roslynator
- Homepage: https://josefpihrt.github.io/docs/roslynator
- awesome-repositories: https://awesome-repositories.com/repository/dotnet-roslynator.md

## Topics

`csharp` `dotnet` `roslyn` `visual-studio`

## Description

Roslynator is a set of tools for finding and fixing code quality, correctness, and style problems in C#, built on the Roslyn compiler platform. It combines a collection of rule-based analyzers distributed as NuGet packages, an extension for Visual Studio and VS Code that applies refactorings and compiler diagnostic fixes while editing, and a command-line tool installed as a global .NET tool. Analyzers report issues during builds and in the editor, and many come with automatic code fixes.

The command-line tool runs analysis headlessly over whole solutions, so the same checks work in scripts and continuous integration pipelines. It can export findings as SARIF or GitLab analyzer reports, and it can be set to return a success exit code when issues are found so builds don't fail on findings alone. Beyond analysis, it can find and optionally remove unused types and members, spellcheck identifiers, comments and file names, and generate API reference documentation from assemblies in formats suited to static site generators such as Docusaurus or Sphinx.

Roslynator also serves people who write their own analyzers. Helper libraries add types on top of the compiler platform API for building custom analyzers, refactorings, and code fixes, and xUnit and MSTest testing packages let authors run them against sample code and assert the exact diagnostics and resulting source. Analyzer behavior is tuned through editor config files, including rule toggles and options such as maximum line length. For editors where the main extension cannot be installed, refactorings and compiler fixes are also available as standalone NuGet packages.

## Tags

### Development Tools & Productivity

- [Roslyn Analyzer Collections](https://awesome-repositories.com/f/development-tools-productivity/roslyn-analyzer-collections.md) — Ships a large set of rule-based C# analyzers as NuGet packages that flag quality, correctness, and style problems during builds and in the editor, with automatic fixes.
- [C# Code Analysis Toolkits](https://awesome-repositories.com/f/development-tools-productivity/c-code-analysis-toolkits.md) — Combines analyzers, an IDE extension, and a command-line tool to find and fix quality, correctness, and style problems in C# code.
- [Automated Code Refactoring](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-and-transformation/automated-code-refactoring.md) — Applies code transformations and fixes for compiler warnings and errors directly while editing C# in Visual Studio or VS Code.
- [Command-Line Installers](https://awesome-repositories.com/f/development-tools-productivity/command-line-installers.md) — Installs as a global .NET tool that runs C# code analysis from the terminal, in scripts and CI pipelines. ([source](https://github.com/dotnet/roslynator/blob/main/README.md))
- [Roslyn Analyzer Development Libraries](https://awesome-repositories.com/f/development-tools-productivity/roslyn-analyzer-development-libraries.md) — Provides helper libraries over the compiler platform API plus xUnit and MSTest packages for building and testing custom analyzers, refactorings, and code fixes.
- [.NET API Reference Generators](https://awesome-repositories.com/f/development-tools-productivity/api-documentation-generators/net-api-reference-generators.md) — Generates API reference documentation from assemblies, formatted for static site hosts such as Docusaurus or Sphinx. ([source](https://github.com/dotnet/roslynator/blob/main/CHANGELOG.md))
- [Custom Analyzer Authoring Libraries](https://awesome-repositories.com/f/development-tools-productivity/custom-analyzer-authoring-libraries.md) — Provides helper libraries on top of the compiler platform API for building custom analyzers, refactorings, and code fixes. ([source](https://github.com/dotnet/roslynator/blob/main/README.md))
- [Headless Solution Analysis Hosts](https://awesome-repositories.com/f/development-tools-productivity/headless-solution-analysis-hosts.md) — Loads whole solutions through an MSBuild workspace as a global .NET tool and runs analyzers headlessly for scripts and pipelines.

### Testing & Quality Assurance

- [C# Static Analysis](https://awesome-repositories.com/f/testing-quality-assurance/c-static-analysis.md) — Runs rule-based C# analyzers in the editor, during builds, and from the command line to catch quality, correctness, and style problems.
- [Code Quality Analyzers](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/code-quality-analyzers.md) — Installs collections of C# analyzer packages through NuGet so quality, correctness, and formatting issues appear during builds and in the editor. ([source](https://github.com/dotnet/roslynator/blob/main/README.md))
- [Static Code Analyzers](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analyzers.md) — Ships rule-based analyzers through NuGet packages that scan C# code for quality, correctness, and formatting problems during builds and in the editor. ([source](https://github.com/dotnet/roslynator#readme))
- [Local Refactoring Testing](https://awesome-repositories.com/f/testing-quality-assurance/automated-test-suites/local-test-execution/local-refactoring-testing.md) — Offers xUnit and MSTest packages to verify custom analyzers, refactorings, and compiler fixes without pinning the compiler version. ([source](https://github.com/dotnet/roslynator/blob/main/CHANGELOG.md))
- [Unused Code and Translation Audits](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/unused-code-and-translation-audits.md) — Searches a solution for unused types and members matching kind and visibility filters, and optionally removes them from source. ([source](https://github.com/dotnet/roslynator/blob/main/CHANGELOG.md))
- [SARIF Integrations](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/sarif-integrations.md) — Exports analysis findings as SARIF files or GitLab analyzer reports so pipelines and hosting platforms can display them. ([source](https://github.com/dotnet/roslynator/blob/main/CHANGELOG.md))
- [Unit Testing and Code Coverage](https://awesome-repositories.com/f/testing-quality-assurance/unit-testing-and-code-coverage.md) — Supports unit tests that run analyzers, refactorings, and code fixes against sample code and assert exact diagnostics and resulting source. ([source](https://github.com/dotnet/roslynator/blob/main/README.md))
- [Analyzer Sample-Code Test Harnesses](https://awesome-repositories.com/f/testing-quality-assurance/unit-testing-and-code-coverage/analyzer-sample-code-test-harnesses.md) — Compiles sample code snippets in memory, runs analyzers or fixes against them, and asserts exact diagnostics and resulting source text.

### Software Engineering & Architecture

- [Automated Code Fixes](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting/automatic-format-detection/automated-code-fixes.md) — Flags style and correctness problems with rule-based analyzers that offer automatic fixes, such as removing redundant catch blocks. ([source](https://github.com/dotnet/roslynator/blob/main/CHANGELOG.md))
- [Syntax Tree Analysis](https://awesome-repositories.com/f/software-engineering-architecture/syntax-tree-analysis.md) — Analyzes C# code by walking compiler syntax trees and semantic models so checks understand real language structure instead of raw text.

### DevOps & Infrastructure

- [Continuous Integration Checks](https://awesome-repositories.com/f/devops-infrastructure/continuous-integration-pipelines/continuous-integration-checks.md) — Plugs C# analysis into CI pipelines and exports findings as SARIF or GitLab reports without failing builds on findings alone.
- [Analyzer Package Distributions](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/software-distribution/nuget-based-distributions/analyzer-package-distributions.md) — Ships analyzer rules as NuGet packages that the compiler loads automatically during builds and in editor design-time analysis.

### Programming Languages & Runtimes

- [API Documentation Generators](https://awesome-repositories.com/f/programming-languages-runtimes/api-documentation-generators.md) — Generates API reference documentation from compiled assemblies in formats suited to static site generators such as Docusaurus or Sphinx.
- [.NET Command Line Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/net-command-line-interfaces.md) — Ships as a global .NET command-line tool that runs analysis, spellchecking, and documentation generation in scripts and CI pipelines.

### System Administration & Monitoring

- [Compiler Analyzers](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/diagnostic-error-reporting/compiler-analyzers.md) — Provides libraries and testing packages for creating analyzers, refactorings, and code fixes on the Roslyn compiler platform and verifying them.
