diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-04-22 16:43:54 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-04-22 16:43:54 -0400 |
commit | 33ded1844f7a8237df492600876c117d19ec4170 (patch) | |
tree | 36c9ca09db2e65bc9615288e5d565200048aa7f7 /git/pylint.sh | |
parent | b3c9e90b10dd5708454628ea037708cfd8374599 (diff) | |
parent | 8f0e10e33726db46da1882b03d2e3a6a9689924c (diff) | |
download | openshift-33ded1844f7a8237df492600876c117d19ec4170.tar.gz openshift-33ded1844f7a8237df492600876c117d19ec4170.tar.bz2 openshift-33ded1844f7a8237df492600876c117d19ec4170.tar.xz openshift-33ded1844f7a8237df492600876c117d19ec4170.zip |
Merge pull request #181 from kwoodson/git_hooks
Adding git hooks for jenkins repository validation.
Diffstat (limited to 'git/pylint.sh')
-rwxr-xr-x | git/pylint.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/git/pylint.sh b/git/pylint.sh new file mode 100755 index 000000000..73d08e00c --- /dev/null +++ b/git/pylint.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + + +OLDREV=$1 +NEWREV=$2 +TRG_BRANCH=$3 + +/usr/bin/git diff --name-only $OLDREV $NEWREV --diff-filter=ACM | \ + grep ".py$" | \ + xargs -r -I{} /usr/bin/python -m pylint --rcfile ${WORKSPACE}/git/.pylintrc {} + +exit $? |