From 109daa7f8cfa0e05810c8906f1df11b509142c61 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 6 Jul 2018 10:19:36 +0100 Subject: [PATCH] dev_scripts: pylint fixes - Add "set -e" to abort on error - Update the required version - Fix path for the "default" runs --- dev_scripts/pylint | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dev_scripts/pylint b/dev_scripts/pylint index 060dfba7..15aa3030 100755 --- a/dev_scripts/pylint +++ b/dev_scripts/pylint @@ -1,4 +1,5 @@ #!/bin/bash +set -e DEFAULT_DIRS=( wa @@ -33,11 +34,11 @@ compare_versions() { return 0 } -pylint_version=$(python -c 'from pylint.__pkginfo__ import version; print version') -compare_versions $pylint_version "1.5.1" +pylint_version=$(python3 -c 'from pylint.__pkginfo__ import version; print(version)') +compare_versions $pylint_version "1.9.2" result=$? if [ "$result" == "2" ]; then - echo "ERROR: pylint version must be at least 1.5.1; found $pylint_version" + echo "ERROR: pylint version must be at least 1.9.2; found $pylint_version" exit 1 fi @@ -46,7 +47,7 @@ CWD=$PWD pushd $THIS_DIR > /dev/null if [[ "$target" == "" ]]; then for dir in "${DEFAULT_DIRS[@]}"; do - PYTHONPATH=. pylint --rcfile ../extras/pylintrc --load-plugins pylint_plugins $CWD/$dir + PYTHONPATH=. pylint --rcfile ../extras/pylintrc --load-plugins pylint_plugins $THIS_DIR/../$dir done else PYTHONPATH=. pylint --rcfile ../extras/pylintrc --load-plugins pylint_plugins $CWD/$target