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

When using `CallInfo.ArgAt` to get the value set into an indexer, the NS3000 diagnostic is produced even though the code runs without issues. ```cs public interface IClass { int this[string...

bug

NSubstitute moved to GitHub actions [recently](https://github.com/nsubstitute/NSubstitute/pull/754). NSubstitute.Analyzers should do the same

I have a simple interface and a class that dispatches against it: ``` public interface IReportRunner { void Execute(int year, int month); } public class ClassThatTakesInterfaceDependency { private readonly IReportRunner...

Is there already an analyzer that schould trigger when the following incorrect use happens? This caused some isssues in my test library and I only found out after commenting out...

Assume an interface and an extension method for that interface: ```csharp public interface IHolder { string Value { get; set; } } public static class IHolderExtensions { public static void...

For example code: transactionScopeFactory.Received(1).Create(); Analyzers makes a warning NS5000 here, when Create method is static.

Hello, Thanks for your work on the Analyzer, it's a great package! I wanted to start using it at work, but I found one issue with the introduce substitute code...

blocked

**NS2002** / **Constructor parameters count mismatch** Here's a type: ````cs public class Something { public Something(string? foo = "foo", int? bar = 10) { // etc. } } ```` This...

[NS1000](https://github.com/nsubstitute/NSubstitute.Analyzers/blob/master/documentation/rules/NS1000.md) and [NS1001](https://github.com/nsubstitute/NSubstitute.Analyzers/blob/master/documentation/rules/NS1001.md) sometimes lie. At least, sometimes NSubstitute can actually substitute the methods correctly. I don't quite get/know why this works, because I agree with the warning that it...

Like the title mentions the NSubstitute.Analyzers.CSharp crashes Visual Studio. Visual Studio Version: 17.0 Preview (17.0 build 4729) NSubstitute.Analyzers.CSharp 1.0.15