4 best tools to implement for your githooks in an iOS project.
Last refresh: 05/10/2024
Git Hooks are programs that you can place in a your .git/hooks/ directory to trigger actions at certain points in Git’s execution. These scripts are the best enablers for increasing the quality of your codebase or your productivity. Here is my selection of the best tools to use in your hooks that we use at Shopmium. I will present hooks code samples about :
- SwiftFormat: The autoformatter
- SwiftLint: The Swift linter
- Periphery: A dead code detector
- Terminal-notifier: Get notified after checks failed or succeeded
And if you are looking for the Android equivalent for your teammates I have written this article ⬇️.
#1 SwiftFormat — The mandatory one
SwiftFormat is the #1 tool you should put in your git-hook pre-commit. SwiftFormat allows you to format iOS source code and the available options and configuration make this tool very flexible and powerful, on…