Skip to content

Instantly share code, notes, and snippets.

View alielsokary's full-sized avatar

Ali Elsokary alielsokary

View GitHub Profile
@alielsokary
alielsokary / swiftlint pre-commit.sh
Last active August 20, 2020 06:59
Swiftlint pre-commit hook
# add this to .git/hooks directory without any file extension like so 'pre-commit'.
# run chmod +x pre-commit to give it the proper permission.
# this script runs swiftlint from Pods. But it's recommended to also
# install swiftlint with brew to quickly run 'swiftlint autocorrect' in the project root directory.
#!/bin/bash
# Finding SwiftLint
LINT=./Pods/SwiftLint/swiftlint
if [[ -e "${LINT}" ]]; then