Skip to content

Instantly share code, notes, and snippets.

View samwize's full-sized avatar
💭
 writing apps i want to use

Junda samwize

💭
 writing apps i want to use
View GitHub Profile
@samwize
samwize / pre-commit
Last active May 9, 2022 07:25 — forked from candostdagdeviren/pre-commit
Git Pre-Commit hook with SwiftLInt
#!/bin/bash
SWIFT_LINT=./Pods/SwiftLint/swiftlint
if [[ -e "${SWIFT_LINT}" ]]; then
# Export files in SCRIPT_INPUT_FILE_$count to lint against later
count=0
while IFS= read -r file_path; do
export SCRIPT_INPUT_FILE_$count="$file_path"
count=$((count + 1))