summaryrefslogtreecommitdiffstats
path: root/git/pylint.sh
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-04-22 16:43:54 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-04-22 16:43:54 -0400
commit33ded1844f7a8237df492600876c117d19ec4170 (patch)
tree36c9ca09db2e65bc9615288e5d565200048aa7f7 /git/pylint.sh
parentb3c9e90b10dd5708454628ea037708cfd8374599 (diff)
parent8f0e10e33726db46da1882b03d2e3a6a9689924c (diff)
downloadopenshift-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-xgit/pylint.sh12
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 $?