mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Enable IDE0062: MakeLocalFunctionStatic (#14044)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0062
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user