-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
Description
In some of my projects I get the following error when building:
CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.
My guess is that the following IsEmpty check should happen before Peek():
Lines 74 to 78 in 686a33b
| var member = Members.Peek(); | |
| if (Members.IsEmpty) | |
| { | |
| // no op | |
| } |
If you need me to provide more information, let me know how and I will see what I can do.
Versions
- FluentAssertions.Analyzers 0.11.3
- .NET Framework 4.6.1