saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
524 stars 39 forks source link

False positive with implementing several interfaces #1890

Closed DrAlexD closed 8 months ago

DrAlexD commented 9 months ago

Describe the bug

When implementing several interfaces and executing diktat fix, for some reason the interfaces end up on new line.

Expected behavior

class A<K : Any, P : Any, G : Any> : B<K>(), C<P>, D<G> {}

Observed behavior

class A<K : Any, P : Any, G : Any> : B<K>(),
C<P>,
D<G> {}

Steps to Reproduce

class A<K : Any, P : Any, G : Any> : B<K>(), C<P>, D<G> {}
diphtongue commented 8 months ago

According to guide (3.6.2.8), if the supertype list has more than two elements, they should be separated by newlines. However, this observed behavior doesn't match the guide: first supertype should also be on the new line.