Skip to content

Instantly share code, notes, and snippets.

View jasesuperhero's full-sized avatar
🤘
Let's rock

Daniel Kalintsev jasesuperhero

🤘
Let's rock
View GitHub Profile
@jasesuperhero
jasesuperhero / pre-commit
Created January 16, 2018 22:26 — forked from candostdagdeviren/pre-commit
Git Pre-Commit hook with SwiftLInt
#!/bin/bash
#Path to swiftlint
SWIFT_LINT=/usr/local/bin/swiftlint
#if $SWIFT_LINT >/dev/null 2>&1; then
if [[ -e "${SWIFT_LINT}" ]]; then
count=0
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do
export SCRIPT_INPUT_FILE_$count=$file_path