Skip to content

Commit 319d8ab

Browse files
Set the default values of extendedIndentAfterOperators and extendedIndentBeforeDot to false
### What's done: * Since Kotlin style guide mentions no continuation indent, and IDEA defaults to no continuation indent as well, all `extendedIndent*` flags default to `false` from now on. * Closes: #1312
1 parent d7810d6 commit 319d8ab

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

diktat-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
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
209-
extendedIndentAfterOperators: true
209+
extendedIndentAfterOperators: false
210210
# If true: when dot qualified expression starts on a new line, this line will be indented with two indentations instead of one
211211
extendedIndentBeforeDot: false
212212
# The indentation size for each file
@@ -527,4 +527,4 @@
527527
enabled: true
528528
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
529529
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
530-
enabled: true
530+
enabled: true

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
newlineAtEnd: true
128128
extendedIndentOfParameters: false
129129
alignedParameters: true
130-
extendedIndentAfterOperators: true
130+
extendedIndentAfterOperators: false
131131
indentationSize: 4
132132
- name: EMPTY_BLOCK_STRUCTURE_ERROR
133133
enabled: true

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ internal class IndentationConfig(config: Map<String, String>) : RuleConfiguratio
2626
/**
2727
* If true, if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one
2828
*/
29-
val extendedIndentAfterOperators = config["extendedIndentAfterOperators"]?.toBoolean() ?: true
29+
val extendedIndentAfterOperators = config["extendedIndentAfterOperators"]?.toBoolean() ?: false
3030

3131
/**
3232
* If true, when dot qualified expression starts on a new line, this line will be indented with
3333
* two indentations instead of one
3434
*/
35-
val extendedIndentBeforeDot = config["extendedIndentBeforeDot"]?.toBoolean() ?: true
35+
val extendedIndentBeforeDot = config["extendedIndentBeforeDot"]?.toBoolean() ?: false
3636

3737
/**
3838
* The indentation size for each file

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
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
211-
extendedIndentAfterOperators: true
211+
extendedIndentAfterOperators: false
212212
# If true: when dot qualified expression starts on a new line, this line will be indented with two indentations instead of one
213213
extendedIndentBeforeDot: false
214214
# The indentation size for each file
@@ -529,4 +529,4 @@
529529
enabled: true
530530
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
531531
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
532-
enabled: true
532+
enabled: true

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
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
211-
extendedIndentAfterOperators: true
211+
extendedIndentAfterOperators: false
212212
# The indentation size for each file
213213
indentationSize: 4
214214
# Checks that there is no empty blocks in a file.
@@ -525,4 +525,4 @@
525525
enabled: true
526526
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
527527
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
528-
enabled: true
528+
enabled: true

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
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
211-
extendedIndentAfterOperators: true
211+
extendedIndentAfterOperators: false
212212
# The indentation size for each file
213213
indentationSize: 4
214214
# Checks that there is no empty blocks in a file.
@@ -525,4 +525,4 @@
525525
enabled: true
526526
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
527527
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
528-
enabled: true
528+
enabled: true

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
newlineAtEnd: true
131131
extendedIndentOfParameters: false
132132
alignedParameters: true
133-
extendedIndentAfterOperators: true
133+
extendedIndentAfterOperators: false
134134
indentationSize: 4
135135
- name: EMPTY_BLOCK_STRUCTURE_ERROR
136136
enabled: true

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
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
211-
extendedIndentAfterOperators: true
211+
extendedIndentAfterOperators: false
212212
# The indentation size for each file
213213
indentationSize: 4
214214
# Checks that there is no empty blocks in a file.
@@ -525,4 +525,4 @@
525525
enabled: true
526526
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
527527
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
528-
enabled: true
528+
enabled: true

examples/maven/diktat-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
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
211-
extendedIndentAfterOperators: true
211+
extendedIndentAfterOperators: false
212212
# The indentation size for each file
213213
indentationSize: 4
214214
# Checks that there is no empty blocks in a file.
@@ -525,4 +525,4 @@
525525
enabled: true
526526
# Only properties from the primary constructor should be documented in a @property tag in class KDoc
527527
- name: KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER
528-
enabled: true
528+
enabled: true

0 commit comments

Comments
 (0)