Skip to content

PipelineIndentation: when not set to NoIndentation: does not cater for case where line continuation token is used instead of pipeline (->missing indentation) #1317

Open
@bergmeister

Description

@bergmeister
foo `
-bar |
baz
foo `
# comment
-bar |
baz

Expected behavior

Calling Invoke-Formatter on it (PipelineIndentation is not NoIndentation, which is not the default), then baz should be indented twice (once because of the previous backtick and once because of the rule itself. It only gets indented once

foo `
    # comment
    -bar |
        baz

Actual behavior

foo `
    # comment
    -bar |
    baz

If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *

Environment data

PSSA 1.18,1 or latest version of master

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