Skip to content

class-signature

Kotlinstyleno fixdefault: offkotlin/ktlint

Reports a class header (name, constructor, supertypes) that the formatter would lay out differently.

A long class header is laid out by fixed rules, so that all classes of a project look the same and a change to one parameter is one line in the diff.

To fix, run the formatter.

Reported
class A(val a: Int,
...
...
kotlin:
lint:
rules:
class-signature: warn # off (default), warn, error

Enabled by the presets: kotlin/ktlint.

Suppress one line with sudsy-disable-next-line class-signature in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
ktlint class-signature full