Enable IDE0062: MakeLocalFunctionStatic (#14044)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0062
This commit is contained in:
parent
774d7d7891
commit
1dc0ba4a69
|
@ -911,7 +911,7 @@ dotnet_diagnostic.IDE0060.severity = silent
|
|||
dotnet_diagnostic.IDE0061.severity = silent
|
||||
|
||||
# IDE0062: MakeLocalFunctionStatic
|
||||
dotnet_diagnostic.IDE0062.severity = silent
|
||||
dotnet_diagnostic.IDE0062.severity = warning
|
||||
|
||||
# IDE0063: UseSimpleUsingStatement
|
||||
dotnet_diagnostic.IDE0063.severity = silent
|
||||
|
|
|
@ -1073,7 +1073,7 @@ namespace Microsoft.PowerShell
|
|||
private bool ParseFile(string[] args, ref int i, bool noexitSeen)
|
||||
{
|
||||
// Try parse '$true', 'true', '$false' and 'false' values.
|
||||
object ConvertToBoolIfPossible(string arg)
|
||||
static object ConvertToBoolIfPossible(string arg)
|
||||
{
|
||||
// Before parsing we skip '$' if present.
|
||||
return arg.Length > 0 && bool.TryParse(arg.AsSpan().Slice(arg[0] == '$' ? 1 : 0), out bool boolValue)
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace System.Management.Automation
|
|||
{
|
||||
get
|
||||
{
|
||||
string GetFullName(string name, string psSnapInName, string moduleName)
|
||||
static string GetFullName(string name, string psSnapInName, string moduleName)
|
||||
{
|
||||
string result = name;
|
||||
if (!string.IsNullOrEmpty(psSnapInName))
|
||||
|
|
|
@ -1414,7 +1414,7 @@ namespace System.Management.Automation.Language
|
|||
}
|
||||
}
|
||||
|
||||
ExperimentalAttribute GetExpAttributeHelper(AttributeAst attributeAst)
|
||||
static ExperimentalAttribute GetExpAttributeHelper(AttributeAst attributeAst)
|
||||
{
|
||||
AttributeAst potentialExpAttr = null;
|
||||
string expAttrTypeName = typeof(ExperimentalAttribute).FullName;
|
||||
|
|
Loading…
Reference in a new issue