Skip to content

Commit

Permalink
Set the default value of `WRONG_INDENTATION:extendedIndentOfParameter…
Browse files Browse the repository at this point in the history
…s` to `false`

### What's done:

 * The `WRONG_INDENTATION:extendedIndentOfParameters` flag is now unset by default. This closes #1312.
  • Loading branch information
0x6675636b796f75676974687562 committed May 27, 2022
1 parent c6bf512 commit e49a413
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.pinterest.ktlint.core.KtLint
import com.pinterest.ktlint.core.LintError
import com.pinterest.ktlint.core.Rule
import com.pinterest.ktlint.core.api.FeatureInAlphaState
import org.intellij.lang.annotations.Language

/**
* Base class for testing rules without fixing code.
Expand All @@ -23,7 +24,7 @@ open class LintTestBase(private val ruleSupplier: (rulesConfigList: List<RulesCo
* @param fileName optional override for file name
*/
@OptIn(FeatureInAlphaState::class)
fun lintMethod(code: String,
fun lintMethod(@Language("kotlin") code: String,
vararg lintErrors: LintError,
rulesConfigList: List<RulesConfig>? = null,
fileName: String? = null
Expand Down

0 comments on commit e49a413

Please sign in to comment.