Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nsubstitute/nsubstitute.analyzers
Roslyn analysers for NSubstitute.
https://github.com/nsubstitute/nsubstitute.analyzers
csharp dotnet nsubstitute roslyn-analyzer
Last synced: 3 days ago
JSON representation
Roslyn analysers for NSubstitute.
- Host: GitHub
- URL: https://github.com/nsubstitute/nsubstitute.analyzers
- Owner: nsubstitute
- License: mit
- Created: 2018-05-22T00:11:19.000Z (over 6 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-05T20:14:19.000Z (about 1 month ago)
- Last Synced: 2024-11-01T12:36:44.499Z (17 days ago)
- Topics: csharp, dotnet, nsubstitute, roslyn-analyzer
- Language: C#
- Homepage:
- Size: 3.46 MB
- Stars: 30
- Watchers: 6
- Forks: 7
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Analyzers to detect possible NSubstitute usage problems, such as attempts to setup non-virtual members.
| Branch | Build | Coverage |
| ------------- |-------------| -----|
| Master | [![Build status](https://ci.appveyor.com/api/projects/status/t9lhmp61nuy3a7k5/branch/master?svg=true)](https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/branch/master) | [![Coverage Status](https://coveralls.io/repos/github/nsubstitute/NSubstitute.Analyzers/badge.svg?branch=master)](https://coveralls.io/github/nsubstitute/NSubstitute.Analyzers?branch=master) |
| Dev | [![Build status](https://ci.appveyor.com/api/projects/status/t9lhmp61nuy3a7k5/branch/dev?svg=true)](https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/branch/dev) | [![Coverage Status](https://coveralls.io/repos/github/nsubstitute/NSubstitute.Analyzers/badge.svg?branch=dev)](https://coveralls.io/github/nsubstitute/NSubstitute.Analyzers?branch=dev) |## Install via NuGet
* [NSubstitute.Analyzers.CSharp](https://www.nuget.org/packages/NSubstitute.Analyzers.CSharp/)
* [NSubstitute.Analyzers.VisualBasic](https://www.nuget.org/packages/NSubstitute.Analyzers.VisualBasic/)## Motivation
[NSubstitute](https://github.com/nsubstitute/NSubstitute) was designed with the aim of having concise, friendly syntax for mocking. The downside of this syntax is that certain failure modes are hard to detect. One example is attempting to mock non-virtual members -- NSubstitute can not see these calls so can not communicate problems such as `sub.Received().NonVirtualCall()`. Thanks to the goodness of Roslyn analyzers, we now have the option to detect cases like these (as originally proposed in [NSubstitute issue #328](https://github.com/nsubstitute/NSubstitute/issues/328)).
## Documentation
For documentation and reasoning on the rules themselves, see the [Documentation](https://github.com/nsubstitute/NSubstitute.Analyzers/blob/master/documentation).
## Support
Please report any problems or ask questions via the [Issue tracker](https://github.com/nsubstitute/NSubstitute.Analyzers/issues).