summaryrefslogtreecommitdiffstats
path: root/git/pylint.sh
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-04-22 16:15:26 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-04-22 16:36:54 -0400
commit8f0e10e33726db46da1882b03d2e3a6a9689924c (patch)
tree36c9ca09db2e65bc9615288e5d565200048aa7f7 /git/pylint.sh
parentb3c9e90b10dd5708454628ea037708cfd8374599 (diff)
downloadopenshift-8f0e10e33726db46da1882b03d2e3a6a9689924c.tar.gz
openshift-8f0e10e33726db46da1882b03d2e3a6a9689924c.tar.bz2
openshift-8f0e10e33726db46da1882b03d2e3a6a9689924c.tar.xz
openshift-8f0e10e33726db46da1882b03d2e3a6a9689924c.zip
Adding commit hooks for jenkins
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 $?