Skip to content

Commit

Permalink
Fix rules which do not comply to changed indentation rules (pinterest…
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Dingemans committed Jan 3, 2021
1 parent ee822b1 commit d8e3509
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ class AnnotationRuleTest {
@file:Suppress("UnstableApiUsage")
pluginManagement {
}
""".trimIndent()
""".trimIndent()
assertThat(AnnotationRule().lint(code, script = true)).isEqualTo(
listOf(
LintError(1, 34, "annotation", AnnotationRule.fileAnnotationsShouldBeSeparated)
Expand All @@ -957,7 +957,7 @@ class AnnotationRuleTest {
pluginManagement {
}
""".trimIndent()
""".trimIndent()
assertThat(AnnotationRule().lint(code, script = true)).isEmpty()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class ArgumentListWrappingRuleTest {
assertThat(
ArgumentListWrappingRule().lint(
"""
val x = f(
a,
b, c
)
val x = f(
a,
b, c
)
""".trimIndent()
)
).isEqualTo(
Expand All @@ -36,19 +36,19 @@ class ArgumentListWrappingRuleTest {
assertThat(
ArgumentListWrappingRule().format(
"""
val x = f(
a,
b, c
)
val x = f(
a,
b, c
)
""".trimIndent()
)
).isEqualTo(
"""
val x = f(
a,
b,
c
)
val x = f(
a,
b,
c
)
""".trimIndent()
)
}
Expand All @@ -58,25 +58,25 @@ class ArgumentListWrappingRuleTest {
assertThat(
ArgumentListWrappingRule().format(
"""
val x = test(
one("a", "b",
"c"),
"Two", "Three", "Four"
)
val x = test(
one("a", "b",
"c"),
"Two", "Three", "Four"
)
""".trimIndent()
)
).isEqualTo(
"""
val x = test(
one(
"a",
"b",
"c"
),
"Two",
"Three",
"Four"
)
val x = test(
one(
"a",
"b",
"c"
),
"Two",
"Three",
"Four"
)
""".trimIndent()
)
}
Expand All @@ -86,7 +86,7 @@ class ArgumentListWrappingRuleTest {
assertThat(
ArgumentListWrappingRule().lint(
"""
val x = f(a, b, c)
val x = f(a, b, c)
""".trimIndent(),
userData = mapOf("max_line_length" to "10")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ class ParameterListWrappingRuleTest {
assertThat(
ParameterListWrappingRule().lint(
"""
fun f(
a: Any,
b: Any, c: Any
)
fun f(
a: Any,
b: Any, c: Any
)
""".trimIndent()
)
).isEqualTo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,24 @@ class SpacingAroundKeywordRuleTest {
assertThat(
SpacingAroundKeywordRule().format(
"""
var x: String
get () {
return ""
}
private set (value) {
x = value
}
""".trimIndent()
var x: String
get () {
return ""
}
private set (value) {
x = value
}
""".trimIndent()
)
).isEqualTo(
"""
var x: String
get() {
return ""
}
private set(value) {
x = value
}
get() {
return ""
}
private set(value) {
x = value
}
""".trimIndent()
)
}
Expand Down

0 comments on commit d8e3509

Please sign in to comment.