Announcing NSubstitute.Analyzers (beta)

1. Introduction

I am glad to announce that yesterday, together with NSubstitute team we released first beta version of Roslyn analyzers for NSubstitute – NSubstitute.Analyzers. The analyzers come in two flavors: NSubstitute.Analyzers.CSharp and NSubstitute.Analyzers.VisualBasic. Feel free to grab them from NuGet and try them in your project.

2. Diagnostics

As for today analyzers can detect two most common misusages of NSubstitute:

  • non-virtual call setup
  • Received used without following method call

Feels free to suggest additional diagnostic you would like to have in the package.

Announcing NSubstitute.Analyzers (beta)