ExhaustiveMatching icon indicating copy to clipboard operation
ExhaustiveMatching copied to clipboard

C# Analyzer Adding Exhaustive Checking of Switch Statements and Expressions

Results 18 ExhaustiveMatching issues
Sort by recently updated
recently updated
newest added

The readme was planned to have a "Why?" section but it was dropped. Write one. Discussing the expression problem would be good.

documentation

If nullable reference types are enabled, we should enforce requirements for a `case null:` if that isn't already enforced by the compiler.

enhancement

Add a quick fix for error EM011 that a type is not in its parent's list of cases, that adds it.

enhancement

Create a quick fix to add a case clause for a missing case.

enhancement

The `ExhaustiveMatching.Analyzer.Enums` project doesn't seem to be very useful by itself, and the solution and repo could be simplifeid by rolling it into the `ExhaustiveMatching.Analyzer` project. Thoughts?

I had a nasty runtime error just now in a strong-named project targeting .NET Framework 4.8 that uses this NuGet package, as strong-named assemblies transitively require all referenced assemblies to...

In preparation for another (unrelated) PR I'd like to submit shortly, I've added C# 8.0 nullable annotations to the analyzer's source and fixed other current code analysis warnings listed in...

Using `or` in enum matches currently displays error EM0001 in the IDE: ``` sortOrder switch { SomeEnum.Unknown or SomeEnum.NewestFirst => someValue, SomeEnum.OldestFirst => anotherValue, => throw ExhaustiveMatch.Failed(sortOrder) } ```