From b10e54fec2746e82be309019d5cb28bdb8e3f20d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 13 Nov 2021 19:12:34 +0000 Subject: [PATCH 1/2] Fix issue 1580 --- Rules/UseConsistentIndentation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Rules/UseConsistentIndentation.cs b/Rules/UseConsistentIndentation.cs index 3fc7aaa9b..254b5be51 100644 --- a/Rules/UseConsistentIndentation.cs +++ b/Rules/UseConsistentIndentation.cs @@ -260,6 +260,7 @@ caused by tokens that require a closing RParen (which are LParen, AtParen and Do if (pipelineIndentationStyle == PipelineIndentationStyle.None && PreviousLineEndedWithPipe(tokens, tokenIndex, token)) { + onNewLine = false; continue; } From 6a826c47d4c56f172c81a030146c98f466a00263 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 13 Nov 2021 19:19:04 +0000 Subject: [PATCH 2/2] add test case --- Tests/Rules/UseConsistentIndentation.tests.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/Rules/UseConsistentIndentation.tests.ps1 b/Tests/Rules/UseConsistentIndentation.tests.ps1 index ba2048bae..9a0d195eb 100644 --- a/Tests/Rules/UseConsistentIndentation.tests.ps1 +++ b/Tests/Rules/UseConsistentIndentation.tests.ps1 @@ -390,6 +390,11 @@ bar @{ IdempotentScriptDefinition = @' foo | bar +'@ + }, + @{ IdempotentScriptDefinition = @' +foo | + bar -Parameter1 '@ } ) {