You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Motivation
The `run-swift-format.sh` script run as part of soundness explicitly
lists the directories to format. This is to avoid running `swift-format`
on the contents of `.build/` which contains a checkouts of all the
dependencies. This isn't necessary, as we can use Git to tell us what
files need to be formatted, which can also make for a more robust
script/command as we add new directories.
Additionally, with the previous strategy, `Package.swift` at the root of
the repository was ignored. This was deliberate, but in hindsight I
don't think the lack of trailing comma enforcement is worth us excluding
it.
### Modifications
- Use `git ls-files` to determine which files need to be passed to
`swift-format`.
### Result
- Script is simpler (also easier to add a one-shot command as a
pre-commit hook).
- Package.swift is also formatted.
### Test Plan
None.
0 commit comments