Skip to content
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

CA2208 Instantiate argument exceptions correctly #7187

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<Rule Id="CA2119" Action="None" /> <!-- Seal methods that satisfy private interfaces -->
<Rule Id="CA2153" Action="None" /> <!-- Do Not Catch Corrupted State Exceptions -->
<Rule Id="CA2201" Action="None" /> <!-- Do not raise reserved exception types -->
<Rule Id="CA2208" Action="Info" /> <!-- Instantiate argument exceptions correctly -->
<Rule Id="CA2208" Action="Warning" /> <!-- Instantiate argument exceptions correctly -->
<Rule Id="CA2211" Action="None" /> <!-- Non-constant fields should not be visible -->
<Rule Id="CA2213" Action="None" /> <!-- Disposable fields should be disposed -->
<Rule Id="CA2215" Action="None" /> <!-- Dispose methods should call base class dispose -->
Expand Down
2 changes: 1 addition & 1 deletion src/Build.OM.UnitTests/TransientIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public string GetAbsolutePath(string relative)
var absolute = Path.GetFullPath(Path.IsPathRooted(relative) ? relative : Path.Combine(tempRoot, relative));
if (!IsControled(absolute))
{
throw new ArgumentException(nameof(relative));
throw new ArgumentException(null, nameof(relative));
}

return absolute;
Expand Down