trailing-comma-on-call-site
What it does
Section titled “What it does”Reports the last argument of a multi-line call that has a trailing comma the formatter would add or remove.
Why it matters
Section titled “Why it matters”With a trailing comma, adding an argument at the end changes one line instead of two, and moving arguments does not need the comma moved. A project that chooses one form gets the same diff everywhere.
To fix, run the formatter.
Example
Section titled “Example”...
... 1, 2 )
fun bar(...Configuration
Section titled “Configuration”kotlin: lint: rules: trailing-comma-on-call-site: warn # off (default), warn, errorEnabled by the presets: kotlin/ktlint.
Suppress one line with sudsy-disable-next-line trailing-comma-on-call-site 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 | trailing-comma-on-call-site |
full |