summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-19 19:16:30 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-19 19:16:30 +0200
commita5bd847ccfe517b8e1c0e5e5f93ac5a570203858 (patch)
tree580d07aea3a12153ca33b45db0f2cf528b9b71da
parent56b0d46084644594024a0e3664ed6098cbb91624 (diff)
downloadick-a5bd847ccfe517b8e1c0e5e5f93ac5a570203858.tar.gz
Only run pylint if new enough
-rwxr-xr-xcheck9
1 files changed, 8 insertions, 1 deletions
diff --git a/check b/check
index d1281d5..058be2e 100755
--- a/check
+++ b/check
@@ -28,7 +28,14 @@ python -m CoverageTestRunner icklib --ignore-missing-from without-tests
rm .coverage
pep8 ick icklib/*.py
-pylint --rcfile=pylint.conf ick icklib
+
+# We only run pylint if it's new enough. We assume check is being run
+# on Debian, to be able to use dpkg --compare-versions.
+v="$(pylint --version 2>/dev/null | awk '/^pylint/ { print $2 }' | tr -d ,)"
+if dpkg --compare-versions "$v" ge 1.3.1
+then
+ pylint --rcfile=pylint.conf ick icklib
+fi
if env | grep '^ICK_UNSTABLE_TEST_TARGET'
then