Closed
Description
Running swift-format
over the Pigeon-generated output turned up a bunch of places where our generator output doesn't match formatted output. While we don't need it to be perfectly formatted, we do generally want to match expected style in the initial generation. And in a number of cases, the output is distinctly non-idiomatic, like parens in if
statements.
Some things to fix based on initial skim (but when doing this we should iterate a bit with the autoformatter and try to fix anything that's relatively straightforward):
if
statements should not use()
s.case
s should not be indented relative to theswitch
- Conditional imports should be indented
- Multi-line arrays should use trailing commas
- Named params should have a space after
:
, which is missing in some places