Enable CA1065: Do not raise exceptions in unexpected locations (#14117)
This commit is contained in:
parent
567724962e
commit
b5902a6e9f
@ -129,7 +129,7 @@ dotnet_diagnostic.CA1063.severity = none
|
||||
dotnet_diagnostic.CA1064.severity = none
|
||||
|
||||
# CA1065: Do not raise exceptions in unexpected locations
|
||||
dotnet_diagnostic.CA1065.severity = none
|
||||
dotnet_diagnostic.CA1065.severity = warning
|
||||
|
||||
# CA1066: Implement IEquatable when overriding Object.Equals
|
||||
dotnet_diagnostic.CA1066.severity = none
|
||||
|
@ -1618,6 +1618,7 @@ namespace System.Management.Automation
|
||||
/// <summary>
|
||||
/// Gets the valid values in the set.
|
||||
/// </summary>
|
||||
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "<Pending>")]
|
||||
public IList<string> ValidValues
|
||||
{
|
||||
get
|
||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Management.Automation.Internal;
|
||||
@ -875,6 +876,7 @@ namespace System.Management.Automation
|
||||
/// </summary>
|
||||
/// <exception cref="GetValueException">When getting and there is no getter or when the getter throws an exception.</exception>
|
||||
/// <exception cref="SetValueException">When setting and there is no setter or when the setter throws an exception.</exception>
|
||||
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "<Pending>")]
|
||||
public override object Value
|
||||
{
|
||||
get
|
||||
@ -964,6 +966,7 @@ namespace System.Management.Automation
|
||||
/// Gets the type of the value for this member.
|
||||
/// </summary>
|
||||
/// <exception cref="GetValueException">If there is no property getter.</exception>
|
||||
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "<Pending>")]
|
||||
public override string TypeNameOfValue
|
||||
{
|
||||
get
|
||||
@ -1786,6 +1789,7 @@ namespace System.Management.Automation
|
||||
/// </exception>
|
||||
/// <exception cref="SetValueException">When setting and there is no setter,
|
||||
/// when the setter throws an exception or when there is no Runspace to run the script.</exception>
|
||||
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "<Pending>")]
|
||||
public override object Value
|
||||
{
|
||||
get
|
||||
|
Loading…
Reference in New Issue
Block a user