If there currently a detekt / ktlint formatting rule to enforce an empty line after blocks for following code in the same level? Like
Copy code
if (true) {
println()
}
someFunctionCall() // forbidden
vs.
Copy code
if (true) {
println()
}
someFunctionCall() // allowed
b
Brais Gabin
06/24/2024, 10:23 AM
There is not a rule on detekt for that. It is too related to format to be inside detekt. No idea about ktlint.
Brais Gabin
06/24/2024, 10:24 AM
I mean, for sure that with detekt you can write something like that but it would not enter the default rule set. It should be developed as a third party rule.
s
Sebastian Schuberth
06/24/2024, 10:27 AM
I was also checking ktlint, which does not seem to have a rule for this either. So it's not just about a wrapping missing the formatting plugin for detekt or so 😮💨