From 0e7448679387b9c6c8de7890f28ea5a858ed03c5 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 15 Apr 2019 22:07:20 +0100 Subject: [PATCH] Make IncreaseIndentationForFirstPipeline the true default option --- Engine/Settings/CodeFormatting.psd1 | 2 +- Engine/Settings/CodeFormattingAllman.psd1 | 2 +- Engine/Settings/CodeFormattingOTBS.psd1 | 2 +- Engine/Settings/CodeFormattingStroustrup.psd1 | 2 +- Rules/UseConsistentIndentation.cs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Engine/Settings/CodeFormatting.psd1 b/Engine/Settings/CodeFormatting.psd1 index f95164ba2..3a0b3bd4c 100644 --- a/Engine/Settings/CodeFormatting.psd1 +++ b/Engine/Settings/CodeFormatting.psd1 @@ -26,7 +26,7 @@ PSUseConsistentIndentation = @{ Enable = $true Kind = 'space' - PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline' + PipelineIndentation = 'IncreaseIndentationForFirstPipeline' IndentationSize = 4 } diff --git a/Engine/Settings/CodeFormattingAllman.psd1 b/Engine/Settings/CodeFormattingAllman.psd1 index 75829097e..af11307c9 100644 --- a/Engine/Settings/CodeFormattingAllman.psd1 +++ b/Engine/Settings/CodeFormattingAllman.psd1 @@ -26,7 +26,7 @@ PSUseConsistentIndentation = @{ Enable = $true Kind = 'space' - PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline' + PipelineIndentation = 'IncreaseIndentationForFirstPipeline' IndentationSize = 4 } diff --git a/Engine/Settings/CodeFormattingOTBS.psd1 b/Engine/Settings/CodeFormattingOTBS.psd1 index 0bf5a25ff..771313f0a 100644 --- a/Engine/Settings/CodeFormattingOTBS.psd1 +++ b/Engine/Settings/CodeFormattingOTBS.psd1 @@ -26,7 +26,7 @@ PSUseConsistentIndentation = @{ Enable = $true Kind = 'space' - PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline' + PipelineIndentation = 'IncreaseIndentationForFirstPipeline' IndentationSize = 4 } diff --git a/Engine/Settings/CodeFormattingStroustrup.psd1 b/Engine/Settings/CodeFormattingStroustrup.psd1 index dd53075d2..9ef08d800 100644 --- a/Engine/Settings/CodeFormattingStroustrup.psd1 +++ b/Engine/Settings/CodeFormattingStroustrup.psd1 @@ -27,7 +27,7 @@ PSUseConsistentIndentation = @{ Enable = $true Kind = 'space' - PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline' + PipelineIndentation = 'IncreaseIndentationForFirstPipeline' IndentationSize = 4 } diff --git a/Rules/UseConsistentIndentation.cs b/Rules/UseConsistentIndentation.cs index 7b8ba51a4..1203bdf64 100644 --- a/Rules/UseConsistentIndentation.cs +++ b/Rules/UseConsistentIndentation.cs @@ -70,7 +70,7 @@ public string PipelineIndentation if (String.IsNullOrWhiteSpace(value) || !Enum.TryParse(value, true, out pipelineIndentationStyle)) { - pipelineIndentationStyle = PipelineIndentationStyle.IncreaseIndentationAfterEveryPipeline; + pipelineIndentationStyle = PipelineIndentationStyle.IncreaseIndentationForFirstPipeline; } } } @@ -96,7 +96,7 @@ private enum PipelineIndentationStyle // TODO make this configurable private IndentationKind indentationKind = IndentationKind.Space; - private PipelineIndentationStyle pipelineIndentationStyle = PipelineIndentationStyle.IncreaseIndentationAfterEveryPipeline; + private PipelineIndentationStyle pipelineIndentationStyle = PipelineIndentationStyle.IncreaseIndentationForFirstPipeline; /// /// Analyzes the given ast to find violations.