Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify swift-format soundness script (#108)
### 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.
- Loading branch information