Skip to content

Add the possibilty to manage suggestedCorrections property with a script rule #619

Closed
@LaurentDardenne

Description

@LaurentDardenne

In the file ScriptRuleDocumentation.md, it is says :

# DiagnosticRecord should have four properties: Message, Extent, RuleName and Severity

$result = [Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]]@{
    "Message"  = "This is a sample rule"
    "Extent"   = $ast.Extent
    "RuleName" = $PSCmdlet.MyInvocation.InvocationName
    "Severity" = "Warning"
}

It is possible to assign the suggestedCorrections property in a script, but the C# code do not assign this property.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions