NSubstitute.Analyzers icon indicating copy to clipboard operation
NSubstitute.Analyzers copied to clipboard

Roslyn analysers for NSubstitute.

Results 14 NSubstitute.Analyzers issues
Sort by recently updated
recently updated
newest added

Could you detect and suggest the simplification of `...Any` calls with `default` for modern C# versions, [as you describe here]( https://nsubstitute.github.io/help/received-calls/#ignoring-arguments)? ```csharp public interface ITest { void DoSomething(string? thing); }...

enhancement

>I think ideally this should be a different error ("5003 Misused argument matcher"?). The non-virtual cases are very clear in terms of cause and fix. The misuse case is a...

enhancement

**Question** I have an ordinary Test project in my solution, targeting .Net Framework 4.6.2. When I added a Nuget reference to NSubstitute.Analyzers.CSharp, I got several warnings like this: > An...

As reported in here https://github.com/nsubstitute/NSubstitute/issues/499#issuecomment-462328436 NSubstitute.Analyzers fails to find non-virtual member calls when substituting for class but assigning it to interface e.g ```` IUnitOfWorkCoreCqrs cqrsUow = Substitute.ForPartsOf(); cqrsUow.Received(1).RegisterAfterCommitCallBackItem(Arg.Any()); ```` In...

enhancement