heyjaywilson / peakfit

Strength exercise iOS app written in Swift
Apache License 2.0
16 stars 10 forks source link

Use `swift format` instead of `swift-format` in `format-changes.sh` script when using Xcode 16+ #51

Closed samuelsainz closed 1 month ago

samuelsainz commented 1 month ago

Description

From the swift-format docs:

Xcode 16 and above include swift-format in the toolchain. You can run swift-format from anywhere on the system using swift format (notice the space instead of dash).

Because of this, it is not necessary to install swift-format using Homebrew or other custom alternatives. The difference is that to invoke the command you have to use swift format instead of swift-format.

Acceptance criteria

Modify the format-changes.sh script to use swift format instead of swift-format if Xcode version is 16+.

samuelsainz commented 1 month ago

@heyjaywilson hi Jay, if you agree with the change, please feel free to assign it to me as well. Thank you!

heyjaywilson commented 1 month ago

I can get behind this change! As long as both formatting changes still work it makes sense. Xcode 16 is necessary for this project anyway.