Repository navigation
Release v5.2.0
The shared specification lifecycle is now safer to turn on: the analyzers find the facts that change shared state indirectly, so you can tell which classes must stay per fact.
Added
- New warning CRSPEC0012 reports facts that call members which usually change shared state, judged by name:
Execute/Handle(and theirAsyncforms), destructive reads such asTake,Dequeue,PopandMoveNext, and changes such asPush,Enqueue,TryAdd,Reset, orAdd/Remove/Clearon a collection reached through a field. Move the call intoBecause, or mark the class[PerFactSpecificationLifecycle]. (#97)
Changed
- CRSPEC0008 now also reports indirect changes it can prove from the code: writes through nested members and indexers (including compound assignment and
++/--), null-conditional access such as_x?.Clear(),Dispose/DisposeAsyncon a shared field, reconfiguring a shared NSubstitute substitute (Returns,Throws,When,ClearReceivedCalls), and calls to a method in the same file that does any of these. The message names the method the change goes through. (#97) - Upgrade: CRSPEC0008 is an error, so specification projects on the shared lifecycle can get new build errors where a fact really changes shared state. Move the change into
Because, or mark the class[PerFactSpecificationLifecycle]. (#97)