Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0 integration test fixes #2842

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix typo
paul-dingemans committed Oct 24, 2024
commit e1b7ef276cc2b7c5ac6acfd716a596ecaf6e83e7
Original file line number Diff line number Diff line change
@@ -84,8 +84,7 @@ public class BlankLineBetweenWhenConditions :
?.let { whitespaceBeforeWhenEntry ->
emitAndApprove(
whitespaceBeforeWhenEntry.startOffset + 1,
"Add a blank line between all when-condition in case at least one multiline when-condition is found in the " +
"statement",
"Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement",
true,
).ifAutocorrectAllowed {
whitespaceBeforeWhenEntry.upsertWhitespaceBeforeMe("\n${whenEntry.indent()}")
Original file line number Diff line number Diff line change
@@ -84,8 +84,8 @@ class BlankLineBetweenWhenConditionsTest {
@Suppress("ktlint:standard:argument-list-wrapping", "ktlint:standard:max-line-length")
blankLineAfterWhenConditionRuleAssertThat(code)
.hasLintViolations(
LintViolation(4, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(6, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(4, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
LintViolation(6, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
).isFormattedAs(formattedCode)
}

@@ -116,8 +116,8 @@ class BlankLineBetweenWhenConditionsTest {
@Suppress("ktlint:standard:argument-list-wrapping", "ktlint:standard:max-line-length")
blankLineAfterWhenConditionRuleAssertThat(code)
.hasLintViolations(
LintViolation(4, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(5, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(4, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
LintViolation(5, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
).isFormattedAs(formattedCode)
}

@@ -152,8 +152,8 @@ class BlankLineBetweenWhenConditionsTest {
@Suppress("ktlint:standard:argument-list-wrapping", "ktlint:standard:max-line-length")
blankLineAfterWhenConditionRuleAssertThat(code)
.hasLintViolations(
LintViolation(5, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(7, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement"),
LintViolation(5, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
LintViolation(7, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement"),
).isFormattedAs(formattedCode)
}

@@ -182,7 +182,7 @@ class BlankLineBetweenWhenConditionsTest {
""".trimIndent()
@Suppress("ktlint:standard:argument-list-wrapping", "ktlint:standard:max-line-length")
blankLineAfterWhenConditionRuleAssertThat(code)
.hasLintViolation(4, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement")
.hasLintViolation(4, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement")
.isFormattedAs(formattedCode)
}

@@ -209,7 +209,7 @@ class BlankLineBetweenWhenConditionsTest {
""".trimIndent()
@Suppress("ktlint:standard:argument-list-wrapping", "ktlint:standard:max-line-length")
blankLineAfterWhenConditionRuleAssertThat(code)
.hasLintViolation(4, 1, "Add a blank line between all when-condition in case at least one multiline when-condition is found in the statement")
.hasLintViolation(4, 1, "Add a blank line between all when-conditions in case at least one multiline when-condition is found in the statement")
.isFormattedAs(formattedCode)
}
}