-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflicting out/ref argument set #62
Labels
enhancement
New feature or request
Milestone
Comments
tpodolak
added a commit
that referenced
this issue
Mar 10, 2019
tpodolak
added a commit
that referenced
this issue
Mar 10, 2019
tpodolak
added a commit
that referenced
this issue
Mar 10, 2019
tpodolak
added a commit
that referenced
this issue
Mar 10, 2019
tpodolak
added a commit
that referenced
this issue
Mar 10, 2019
tpodolak
added a commit
that referenced
this issue
Mar 11, 2019
tpodolak
added a commit
that referenced
this issue
Mar 11, 2019
tpodolak
added a commit
that referenced
this issue
Mar 17, 2019
tpodolak
added a commit
that referenced
this issue
Mar 17, 2019
tpodolak
added a commit
that referenced
this issue
Mar 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to set argument values from
.Returns
and.AndDoes
. At present the one set in.Returns
wins (not sure we should always rely on this for future versions), but this can result in confusing results.Draft documentation:
NS3006
Cause
Conflicting assignments to out/ref arguments.
Rule description
A violation of this rule occurs when an out or ref argument is assigned via
CallInfo
in both aReturns
and anAndDoes
call.How to fix violations
To fix a violation of this rule remove one of the assignments, so the argument is only assigned in either the
Returns
or theAndDoes
block (not in both).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:
Or for a specific code block:
The text was updated successfully, but these errors were encountered: