Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
toplevel venmo linting script
#!/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