Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.09 KB

File metadata and controls

38 lines (28 loc) · 1.09 KB

NS4000

CheckId NS4000
Category Call configuration

Cause

Calling substitute from within Returns block.

Rule description

A violation of this rule occurs when substitute setup is called within another substitute setup. See more on GitHub

How to fix violations

To fix a violation of this rule, do not setup substitute within another substitute, or replace re-entrant substitute with lambda call.

How to suppress violations

This warning can be suppressed by disabling the warning in the ruleset file for the project. The warning can also be suppressed programmatically for an assembly:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Call configuration", "NS4000:Re-entrant substitute call.", Justification = "Reviewed")]

Or for a specific code block:

#pragma warning disable NS4000 // Re-entrant substitute call.
// the code which produces warning
#pragma warning restore NS4000 // Re-entrant substitute call.