Created
July 29, 2015 15:25
-
-
Save simon-weber/cfb1dcb3118135714abc to your computer and use it in GitHub Desktop.
toplevel venmo linting script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage: | |
# | |
# lint [file1] [file2]... | |
# | |
# With no arguments, lint any tracked files with modifications. | |
# Get venmolint.py into the path so that git-lint detects it. | |
GITROOT=`git rev-parse --show-toplevel` | |
export PATH="$PATH:$GITROOT/venmolint" | |
# The git-lint cache isn't reliable; we clear it before each run. | |
rm -rf ~/.git-lint/cache/ | |
if [ $# -eq 0 ] | |
then | |
# without --tracked, git-lint will also lint untracked files. | |
git lint --tracked --force | |
else | |
git lint --force "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment