Skip to content

Indentation don't follow the same indentation as the row with the open brace #1032

Closed
@johlju

Description

@johlju

Steps to reproduce

$string = '
$test | 
Get-Something | 
Where-Object -FilterScript {
$_.a -eq 1
}
'

Invoke-Formatter -ScriptDefinition $string

Expected behavior

$test |
    Get-Something |
    Where-Object -FilterScript {
        $_.a -eq 1
    }

Actual behavior

$test |
    Get-Something |
    Where-Object -FilterScript {
    $_.a -eq 1
}

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17704.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17704.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }

1.17.1

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