class-signature
What it does
Section titled “What it does”Reports a class header (name, constructor, supertypes) that the formatter would lay out differently.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”class A(val a: Int,...
...Configuration
Section titled “Configuration”kotlin: lint: rules: class-signature: warn # off (default), warn, errorEnabled by the presets: kotlin/ktlint.
Suppress one line with sudsy-disable-next-line class-signature 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 | class-signature |
full |