Skip to content

[Question] Retrieve all Configurable rules #823

Closed
@LaurentDardenne

Description

@LaurentDardenne

I try to retrieve all configurable rule with this code, but the 'AvoidAlias' rule is missing, should not this rule be of the ConfigurableRule type ?

$sb= {dir}
#Force Dll Loading
Invoke-ScriptAnalyzer -ScriptDefinition $sb.ast

$BuiltinRules= [System.AppDomain]::CurrentDomain.GetAssemblies()|? location -match 'Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules'
$BuiltinRules.GetTypes()|? {$_.IsSubclassOf([Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.ConfigurableRule])}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions