blank-line-between-when-conditions
What it does
Section titled “What it does”Reports a when entry with a blank line before it that the formatter would add or remove.
Why it matters
Section titled “Why it matters”Blank lines between the entries of a when are laid out by one rule, so the spacing does not depend on the author and is not changed by hand.
To fix, run the formatter.
Example
Section titled “Example”... else -> println(2) } foo(); bar()...Configuration
Section titled “Configuration”kotlin: lint: rules: blank-line-between-when-conditions: warn # off (default), warn, errorEnabled by the presets: kotlin/ktlint.
Suppress one line with sudsy-disable-next-line blank-line-between-when-conditions in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ktlint | blank-line-between-when-conditions |
full |