Skip to content

Instantly share code, notes, and snippets.

@simon-weber
Created July 29, 2015 15:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simon-weber/cfb1dcb3118135714abc to your computer and use it in GitHub Desktop.
Save simon-weber/cfb1dcb3118135714abc to your computer and use it in GitHub Desktop.
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