Skip to content

Commit 2bd0d8f

Browse files
Revert the default value of extendedIndentOfParameters back to true
### What's done: * This reverts commits 0706885 and (partially) 9e3b5cb. * Closes: #1312
1 parent 8aae73e commit 2bd0d8f

File tree

10 files changed

+25
-25
lines changed

10 files changed

+25
-25
lines changed

diktat-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
# Is newline at the end of a file needed
203203
newlineAtEnd: true
204204
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
205-
extendedIndentOfParameters: false
205+
extendedIndentOfParameters: true
206206
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
207207
alignedParameters: true
208208
# 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 @@
524524
enabled: true
525525
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
526526
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
527-
enabled: true
527+
enabled: true

diktat-common/src/test/resources/test-rules-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
enabled: true
126126
configuration:
127127
newlineAtEnd: true
128-
extendedIndentOfParameters: false
128+
extendedIndentOfParameters: true
129129
alignedParameters: true
130130
extendedIndentAfterOperators: true
131131
indentationSize: 4

diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal class IndentationConfig(config: Map<String, String>) : RuleConfiguratio
1515
/**
1616
* If true, in parameter list when parameters are split by newline they are indented with two indentations instead of one
1717
*/
18-
val extendedIndentOfParameters = config["extendedIndentOfParameters"]?.toBoolean() ?: false
18+
val extendedIndentOfParameters = config["extendedIndentOfParameters"]?.toBoolean() ?: true
1919

2020
/**
2121
* If true, if first parameter in parameter list is on the same line as opening parenthesis, then other parameters

diktat-rules/src/main/resources/diktat-analysis-huawei.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
# Is newline at the end of a file needed
205205
newlineAtEnd: true
206206
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
207-
extendedIndentOfParameters: false
207+
extendedIndentOfParameters: true
208208
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
209209
alignedParameters: true
210210
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one

diktat-rules/src/main/resources/diktat-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
# Is newline at the end of a file needed
205205
newlineAtEnd: true
206206
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
207-
extendedIndentOfParameters: false
207+
extendedIndentOfParameters: true
208208
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
209209
alignedParameters: true
210210
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one

diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt

+15-15
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,19 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) {
396396
"""
397397
|fun foo() {
398398
| consume(Example(
399-
| t1, t2, t3
399+
| t1, t2, t3
400400
| ))
401401
|
402402
| bar(baz(
403-
| 1,
404-
| 2
403+
| 1,
404+
| 2
405405
| )
406406
| )
407407
|
408408
| bar(baz(
409-
| 1,
410-
| 2),
411-
| 3
409+
| 1,
410+
| 2),
411+
| 3
412412
| )
413413
|}
414414
|
@@ -484,15 +484,15 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) {
484484
"""
485485
|fun foo() {
486486
| bar(
487-
| param1 = baz(
488-
| 1,
489-
| 2
490-
| ),
491-
| param2 = { elem ->
492-
| elem.qux()
493-
| },
494-
| param3 = x
495-
| .y()
487+
| param1 = baz(
488+
| 1,
489+
| 2
490+
| ),
491+
| param2 = { elem ->
492+
| elem.qux()
493+
| },
494+
| param3 = x
495+
| .y()
496496
| )
497497
|}
498498
|

examples/gradle-groovy-dsl/diktat-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
# Is newline at the end of a file needed
205205
newlineAtEnd: true
206206
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
207-
extendedIndentOfParameters: false
207+
extendedIndentOfParameters: true
208208
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
209209
alignedParameters: true
210210
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one

examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
enabled: true
129129
configuration:
130130
newlineAtEnd: true
131-
extendedIndentOfParameters: false
131+
extendedIndentOfParameters: true
132132
alignedParameters: true
133133
extendedIndentAfterOperators: true
134134
indentationSize: 4

examples/gradle-kotlin-dsl/diktat-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
# Is newline at the end of a file needed
205205
newlineAtEnd: true
206206
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
207-
extendedIndentOfParameters: false
207+
extendedIndentOfParameters: true
208208
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
209209
alignedParameters: true
210210
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one

examples/maven/diktat-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
# Is newline at the end of a file needed
205205
newlineAtEnd: true
206206
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
207-
extendedIndentOfParameters: false
207+
extendedIndentOfParameters: true
208208
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
209209
alignedParameters: true
210210
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one

0 commit comments

Comments
 (0)