Automating formatting for official D repos
Petar
Petar
Wed Jan 24 09:44:02 UTC 2024
On Wednesday, 24 January 2024 at 01:11:00 UTC, Jonathan M Davis
wrote:
>
> My complaint isn't about that. My complaint is that when you
> have a formatter do it, the code always ends up looking ugly no
> matter the rules used, because it's too inflexible about it.
> [..]
In general, I agree with your sentiment. However it also heavily
depends on the quality of implementation of the formatter, i.e.
the combination of objective rules and subjective heuristics it
applies.
For example, for the past 4-5 years I've had to maintain various
projects written in TypeScript at work. I have yet to find an
instance where a `*.[t|j]sx?` file is formatted with Prettier [0]
and I don't like the end-result.
On the other hand, I've also worked on projects written in Go,
and in general I don't find the result of running `go fmt`
particularly pleasing, but it's tolerable. (But maybe that's
because no matter how you format Go code it will always look
ugly, unlike D :D)
[0]: https://prettier.io/
More information about the Digitalmars-d
mailing list