Closed
Description
This can be repro-ed when setting the vs code setting powershell.codeFormatting.pipelineIndentationStyle
to its new default None
(default in PSSA is still NoIndentation)
Steps to reproduce
Invoke-Formatter -Settings @{ IncludeRules = @('PSUseConsistentIndentation'); Rules = @{ PSUseConsistentIndentation = @{ Enable = $true; PipelineIndentation = 'None' } } } -ScriptDefinition @'
@{
foo = "dfsf"
bar = "dddff"
}
foreach ($Test in $Test1) {
foreach ($Test2 in $TEst3) {
}
}
'@
Expected behavior
@{
foo = "dfsf"
bar = "dddff"
}
foreach ($Test in $Test1) {
foreach ($Test2 in $TEst3) {
}
}
Actual behavior
@{
foo = "dfsf"
bar = "dddff"
}
foreach ($Test in $Test1) {
foreach ($Test2 in $TEst3) {
}
If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *
Environment data
PSSA 1.19.0