With the announcement of the NSubstitute 4.0.0 release candidate I also wanted to introduce the NSubstitute.Analyzers project.
There has always been a tension between NSubstitute's nice, concise syntax, and detecting accidental misuses of the API. With NSubstitute.Analyzers we now get the best of both worlds, with Roslyn being used to detect potential issues at compile time!
This project has been developed entirely by @tpodolak, who has done an amazing job implementing 19 different diagnostics to warn against common API usage problems.
@tpodolak's announcement of 1.0.0:
Documentation landing page:
Please give it a try and let us know what you think!