A collection of Roslyn-based code analyzers for .NET projects, targeting async usage, exception handling, code maintainability, and security best practices.
License
—
Deps
1
Install Size
—
Vulns
✓ 0
Published
Jan 6, 2026
$ dotnet add package Oakrey.CodeAnalyzersThe Oakrey.CodeAnalyzers package provides a collection of Roslyn-based code analyzers designed to help .NET developers enforce best practices, improve code quality, and catch common issues early in the development process. These analyzers target a range of code patterns, from async usage to exception handling and code maintainability.
Async and Task Usage
async void methods (AsyncVoidAnalyzer).CancellationToken (MissingCancellationTokenAnalyzer).Exception Handling
catch blocks that may hide errors (GeneralCatchAnalyzer).SilentCatchAnalyzer).Code Maintainability
MultipleClassesInOneFileAnalyzer).Thread.Sleep which can block threads and degrade performance (ThreadSleepAnalyzer).TodoFixMeAnalyzer).Security and Reliability
PIIDataPatternAnalyzer).RegexTimeoutAnalyzer).You can install the package via NuGet Package Manager, Package Manager Console or the .NET CLI.
Oakrey.CodeAnalyzers and click Install.Run the following command in your terminal:
dotnet add package Oakrey.CodeAnalyzers
Run the following command in your Package Manager Console:
Install-Package Oakrey.CodeAnalyzers
Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.
This project is licensed under the MIT License. See the LICENSE file for details.