NSubstitute.Analyzers
NSubstitute.Analyzers copied to clipboard
NS2002 falsely triggered by optional ctor args
NS2002 / Constructor parameters count mismatch
Here's a type:
public class Something {
public Something(string? foo = "foo", int? bar = 10) {
// etc.
}
}
This triggers the analyzer:
Substitute.ForPartsOf<Foo>()
Those ctor args are optional.