nuget.org : throwsanalyzer
A production-ready Roslyn analyzer providing comprehensive exception handling analysis for C# code with 30 diagnostic rules and 16 automated code fixes. Features: • 30 diagnostic rules covering all exception patterns • 16 automated code fixes for one-click issue resolution • Exception flow analysis across method calls • Async/await exception pattern detection • Iterator (yield) exception analysis • Lambda and event handler exception detection • Best practices and design pattern suggestions • Hot path performance analysis • Result<T> pattern recommendations Detects: • Unhandled exceptions and missing try-catch blocks • Rethrow anti-patterns (throw ex vs throw) • Unreachable and empty catch clauses • Async void exceptions and unobserved tasks • Exceptions in loops (performance issues) • Custom exception naming violations • Exception-based control flow • Undocumented public API exceptions Automated Fixes: • Wrap code in try-catch blocks • Fix rethrow statements to preserve stack traces • Convert async void to async Task • Add XML exception documentation • Rename exception types to follow conventions • Move validation outside loops • Add Task observation (await, continuations) • And more! Perfect for: Code quality enforcement, automated code reviews, CI/CD integration, and teaching exception best practices.
Registry
-
Source
- JSON
- codemeta.json
purl: pkg:nuget/throwsanalyzer
Keywords:
roslyn
, analyzer
, csharp
, exceptions
, throw
, try-catch
, diagnostic
, code-fixes
, async
, await
, iterator
, lambda
, best-practices
, code-quality
, static-analysis
License: MIT
Latest release: 4 months ago
First release: 4 months ago
Last synced: 10 days ago