Enable CA1812 (#15674)
[CA1812: Avoid uninstantiated internal classes](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812)
This commit is contained in:
parent
1e992c5e53
commit
b77bbf8640
|
@ -346,7 +346,7 @@ dotnet_diagnostic.CA1810.severity = none
|
|||
|
||||
# CA1812: Avoid uninstantiated internal classes
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812
|
||||
dotnet_diagnostic.CA1812.severity = none
|
||||
dotnet_diagnostic.CA1812.severity = warning
|
||||
|
||||
# CA1813: Avoid unsealed attributes
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1813
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
@ -159,6 +160,10 @@ namespace Microsoft.PowerShell.Commands.Utility
|
|||
}
|
||||
}
|
||||
|
||||
[SuppressMessage(
|
||||
"Microsoft.Performance",
|
||||
"CA1812:AvoidUninstantiatedInternalClasses",
|
||||
Justification = "Class is instantiated through late-bound reflection")]
|
||||
internal class JoinItemCompleter : IArgumentCompleter
|
||||
{
|
||||
public IEnumerable<CompletionResult> CompleteArgument(
|
||||
|
|
Loading…
Reference in a new issue