I have no objections to a sweeping code style change removing all trailing
commas. I googled "scalafmt trailing commas" and found no ideal solution.
Based on what I read, you can simply remove line 32 from
daffodil/.scalafmt.conf (removing the line suffices since
rewrite.trailingCommas.style
Here is some Go code use with trailing commans in function declaration and
invocation:
https://go.dev/play/p/avjdriC_x6b
In both those examples, the comma is required. Removing it causes a syntax
error and I think this is due to the ASI rules and when a virtual semicolon can
be inserted.
Both those code examples you showed have almost no function calls. The only
examples of trailing commas in those are lists of uniform things.
It is not in lists of things that I care about this issue.
It is in argument lists of function calls, tuples, and formal argument list
definitions, and
Python allows dangling commas and there tends to be encouraged:
https://github.com/python/cpython/blob/3.12/Lib/logging/__init__.py#L113
In Go, they are required by the syntax:
https://cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/go/token/token.go;l=233
JavaScript allows it too but that