Closed stavares843 closed 3 years ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and
0 Security Hotspots to review)
1 Code Smell
No Coverage information
0.0% Duplication
Thank you very much for your effort, @stavares843, and sorry for not getting back to you sooner!
With the recent commits, I have added a .swiftformat
configuration file that excludes the src/
directory. The reason for this is that I want to avoid merge conflicts with the master
branch of the original GoMap repository as much as possible. By limiting the formatting to only those Swift files that are used for this repository, merge conflicts should occur much less.
As for the implementation detail, I have opted for just using a locally installed swiftformat
binary. (So you need to run brew install swiftformat
first), since I was unsure about using Swift Package Manager for this. Looking at SwiftFormat's documentation, it sounds as if they suggest to use SPM in case one wanted to run SwiftFormat as part of a build phase. From my experience, this comes with a significant downside (that is also outlined in their documentation):
Adding this script will overwrite your source files as you work on them, which has the annoying side-effect of clearing the undo history.
I plan on adding a pre-commit
hook that automatically formats the staged files.
What is your experience with this? Do you have another opinion or ideas? Again, thanks for your contribution and sorry for the delay!
https://github.com/wtimme/OSM-Completionist/issues/53