- 
                Notifications
    
You must be signed in to change notification settings  - Fork 403
 
Open
Description
After executing the following code, the = in variable assignments are not aligned, and the = in the first hashtable are also not aligned. I tested this in PowerShell 5.1 on Windows 10.
cls
$s = @'
$hashtable = @{ property1    ="value"
    anotherProperty= "another value"
}
$hashtable = @{
    property1 = "value"
    anotherProperty = "another value"
}
$hashtable = @{
    property1              = "value"
    anotherProperty = "another value"
}
$a= "hello"
   $ccc = "world"
 $b="Hi"
function foo {
"hello"
}
'@
$settings = @{
    IncludeRules = @("PSPlaceOpenBrace", "PSUseConsistentIndentation", "PSUseConsistentWhitespace","PSAlignAssignmentStatement")
    Rules = @{
        PSPlaceOpenBrace = @{
            Enable = $true
            OnSameLine = $false
        }
        PSUseConsistentIndentation = @{
        Enable = $true
			Kind = 'tab' # space,tab
			IndentationSize = 1
			PipelineIndentation = 'NoIndentation'
        }
        PSAlignAssignmentStatement = @{
            Enable = $true
            CheckHashtable = $true
        }
    }
}
Invoke-Formatter -ScriptDefinition $s -Settings $settings
Metadata
Metadata
Assignees
Labels
No labels