Skip to content

Commit

Permalink
Revert the default value of extendedIndentOfParameters back to true
Browse files Browse the repository at this point in the history
### What's done:

 * This reverts commits 0706885 and (partially) 9e3b5cb.
 * Closes: #1312
  • Loading branch information
0x6675636b796f75676974687562 committed Jun 1, 2022
1 parent 8aae73e commit 2bd0d8f
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
enabled: true
2 changes: 1 addition & 1 deletion diktat-common/src/test/resources/test-rules-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
enabled: true
configuration:
newlineAtEnd: true
extendedIndentOfParameters: false
extendedIndentOfParameters: true
alignedParameters: true
extendedIndentAfterOperators: true
indentationSize: 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class IndentationConfig(config: Map<String, String>) : 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
Expand Down
2 changes: 1 addition & 1 deletion diktat-rules/src/main/resources/diktat-analysis-huawei.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion diktat-rules/src/main/resources/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
| )
|}
|
Expand Down Expand Up @@ -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()
| )
|}
|
Expand Down
2 changes: 1 addition & 1 deletion examples/gradle-groovy-dsl/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
enabled: true
configuration:
newlineAtEnd: true
extendedIndentOfParameters: false
extendedIndentOfParameters: true
alignedParameters: true
extendedIndentAfterOperators: true
indentationSize: 4
Expand Down
2 changes: 1 addition & 1 deletion examples/gradle-kotlin-dsl/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/maven/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bd0d8f

Please sign in to comment.