blank line(s) takusemba/ktlint-sample/app/…/Foo.kt:25:7: Line break before assignment is not allowed takusemba/ktlint-sample/app/…/Bar.kt:47:1: Unexpected blank line(s) before “}" …
line="25" column="7" severity="error" message="Line break before assignment is not allowed" source="no-line-break-before-assignment" /> </file> … </checkstyle>
Int, b: Int): Int = a + b """ .trimIndent()) ).isEqualTo(emptyList<LintError>()) assertThat(rule.lint( """ fun add(a: Int, b: Int) = a + b """ .trimIndent()) ).isEqualTo(listOf(LintError(1, 1, "one-line-function", "need return type!!!")))
Int, b: Int): Int = a + b """ .trimIndent()) ).isEqualTo(emptyList<LintError>()) assertThat(rule.lint( """ fun add(a: Int, b: Int) = a + b """ .trimIndent()) ).isEqualTo(listOf(LintError(1, 1, "one-line-function", "need return type!!!"))) val rule = ExpressionFunctionRule() assertThat(rule.lint( """ fun add(a: Int, b: Int): Int = a + b """ .trimIndent()) ).isEqualTo(emptyList<LintError>())