Regarding the new class-signature rule. What is th...
# ktlint
e
Regarding the new class-signature rule. What is the reasoning on not allowing the supertype on the same line for classes w/o parameters?
👀 1
IMO it feels unnecessary to add the line-break before the supertype, but perhaps there's cases where this is needed for consistency?
r
The case I run into is something like
Copy code
class Foo(param: Int) : Bar({
   ...
})
which then becomes
Copy code
class Foo(param: Int) : 
  Bar({
    ...
  })
which adds another layer of indentation. If anyone knows any workarounds that would be great
e
You can disable the rule, but then you lose all the benefit of it in other scenarios 😕
Actually, it might help if you set this config
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 1