X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-analyses%2Fpylint.sh;h=426fcc4b6632b6a4e01d02ec2d96544281de8d27;hb=d322ea802104b2223d02afbff46a2e161cddd143;hp=47947cf66aab169822b966f21cc100ce9d2d8f0d;hpb=5d9b13bf9cbf881219d4976d76e05f5b6d79bfab;p=lttng-ci.git diff --git a/scripts/lttng-analyses/pylint.sh b/scripts/lttng-analyses/pylint.sh index 47947cf..426fcc4 100755 --- a/scripts/lttng-analyses/pylint.sh +++ b/scripts/lttng-analyses/pylint.sh @@ -1,6 +1,6 @@ -#!/bin/sh -exu +#!/bin/bash # -# Copyright (C) 2015 - Michael Jeanson +# Copyright (C) 2020 Michael Jeanson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +set -exu + SRCDIR="src/lttng-analyses" PYTHON3="python3" @@ -23,7 +25,7 @@ P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])") BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build export LD_LIBRARY_PATH="$BABELTRACE_DIR/lib" -export PYTHONPATH="$BABELTRACE_DIR/lib/python${P3_VERSION}/dist-packages/" +export PYTHONPATH="$BABELTRACE_DIR/lib/python${P3_VERSION}/site-packages/" PYENV_HOME=$WORKSPACE/.pyenv/ @@ -35,15 +37,16 @@ fi # Create virtualenv and install necessary packages virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME" -set +u +set +ux +# shellcheck disable=SC1090 . "$PYENV_HOME/bin/activate" -set -u +set -ux pip install --quiet pylint pip install --quiet pep8 + cd "$SRCDIR" pep8 lttnganalyses | tee "$WORKSPACE/pep8.out" - pylint -f parseable --ignore="_version.py" --disable=C0111 lttnganalyses | tee "$WORKSPACE/pylint.out"