From 2bd0d8fed7e9798d7f72fa27cf461090dad1ceed Mon Sep 17 00:00:00 2001 From: Andrey Shcheglov Date: Wed, 1 Jun 2022 17:15:49 +0300 Subject: [PATCH] Revert the default value of `extendedIndentOfParameters` back to `true` ### What's done: * This reverts commits 0706885e1eeb0b185853d0e2d0f2bf4fc73238bd and (partially) 9e3b5cb7d1a84e103ad5020bed096279ad373eb1. * Closes: #1312 --- diktat-analysis.yml | 4 +-- .../src/test/resources/test-rules-config.yml | 2 +- .../utils/indentation/IndentationConfig.kt | 2 +- .../main/resources/diktat-analysis-huawei.yml | 2 +- .../src/main/resources/diktat-analysis.yml | 2 +- .../spaces/IndentationRuleWarnTest.kt | 30 +++++++++---------- .../gradle-groovy-dsl/diktat-analysis.yml | 2 +- .../diktat-analysis.yml | 2 +- .../gradle-kotlin-dsl/diktat-analysis.yml | 2 +- examples/maven/diktat-analysis.yml | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/diktat-analysis.yml b/diktat-analysis.yml index 3deb6ced0e..c274998d6b 100644 --- a/diktat-analysis.yml +++ b/diktat-analysis.yml @@ -202,7 +202,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one @@ -524,4 +524,4 @@ enabled: true # Only properties from the primary constructor should be documented in a @property tag in class KDoc - name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER - enabled: true \ No newline at end of file + enabled: true diff --git a/diktat-common/src/test/resources/test-rules-config.yml b/diktat-common/src/test/resources/test-rules-config.yml index c624736371..44b8b1dab6 100644 --- a/diktat-common/src/test/resources/test-rules-config.yml +++ b/diktat-common/src/test/resources/test-rules-config.yml @@ -125,7 +125,7 @@ enabled: true configuration: newlineAtEnd: true - extendedIndentOfParameters: false + extendedIndentOfParameters: true alignedParameters: true extendedIndentAfterOperators: true indentationSize: 4 diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt index 35aa9e6c8d..a2fb899c87 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt @@ -15,7 +15,7 @@ internal class IndentationConfig(config: Map) : RuleConfiguratio /** * If true, in parameter list when parameters are split by newline they are indented with two indentations instead of one */ - val extendedIndentOfParameters = config["extendedIndentOfParameters"]?.toBoolean() ?: false + val extendedIndentOfParameters = config["extendedIndentOfParameters"]?.toBoolean() ?: true /** * If true, if first parameter in parameter list is on the same line as opening parenthesis, then other parameters diff --git a/diktat-rules/src/main/resources/diktat-analysis-huawei.yml b/diktat-rules/src/main/resources/diktat-analysis-huawei.yml index 1d6301997f..47203259e6 100644 --- a/diktat-rules/src/main/resources/diktat-analysis-huawei.yml +++ b/diktat-rules/src/main/resources/diktat-analysis-huawei.yml @@ -204,7 +204,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one diff --git a/diktat-rules/src/main/resources/diktat-analysis.yml b/diktat-rules/src/main/resources/diktat-analysis.yml index 4fead92a14..9e7e2ffda4 100644 --- a/diktat-rules/src/main/resources/diktat-analysis.yml +++ b/diktat-rules/src/main/resources/diktat-analysis.yml @@ -204,7 +204,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt index 8b971f6ea9..72d081d508 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt @@ -396,19 +396,19 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) { """ |fun foo() { | consume(Example( - | t1, t2, t3 + | t1, t2, t3 | )) | | bar(baz( - | 1, - | 2 + | 1, + | 2 | ) | ) | | bar(baz( - | 1, - | 2), - | 3 + | 1, + | 2), + | 3 | ) |} | @@ -484,15 +484,15 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) { """ |fun foo() { | bar( - | param1 = baz( - | 1, - | 2 - | ), - | param2 = { elem -> - | elem.qux() - | }, - | param3 = x - | .y() + | param1 = baz( + | 1, + | 2 + | ), + | param2 = { elem -> + | elem.qux() + | }, + | param3 = x + | .y() | ) |} | diff --git a/examples/gradle-groovy-dsl/diktat-analysis.yml b/examples/gradle-groovy-dsl/diktat-analysis.yml index 464d7674d0..9ddb699c00 100644 --- a/examples/gradle-groovy-dsl/diktat-analysis.yml +++ b/examples/gradle-groovy-dsl/diktat-analysis.yml @@ -204,7 +204,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one diff --git a/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml b/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml index a2f0b92333..70c0c20916 100644 --- a/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml +++ b/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml @@ -128,7 +128,7 @@ enabled: true configuration: newlineAtEnd: true - extendedIndentOfParameters: false + extendedIndentOfParameters: true alignedParameters: true extendedIndentAfterOperators: true indentationSize: 4 diff --git a/examples/gradle-kotlin-dsl/diktat-analysis.yml b/examples/gradle-kotlin-dsl/diktat-analysis.yml index 464d7674d0..9ddb699c00 100644 --- a/examples/gradle-kotlin-dsl/diktat-analysis.yml +++ b/examples/gradle-kotlin-dsl/diktat-analysis.yml @@ -204,7 +204,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one diff --git a/examples/maven/diktat-analysis.yml b/examples/maven/diktat-analysis.yml index 464d7674d0..9ddb699c00 100644 --- a/examples/maven/diktat-analysis.yml +++ b/examples/maven/diktat-analysis.yml @@ -204,7 +204,7 @@ # Is newline at the end of a file needed newlineAtEnd: true # If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one - extendedIndentOfParameters: false + extendedIndentOfParameters: true # If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it alignedParameters: true # If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one