projects
/
lttng-ci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jjb: lttng-modules: fix typo 'mark_args' -> 'make_args'
[lttng-ci.git]
/
scripts
/
lttng-analyses
/
pylint.sh
diff --git
a/scripts/lttng-analyses/pylint.sh
b/scripts/lttng-analyses/pylint.sh
index 334cda525ffe9a0c143f43e49106d011d6e2bacc..a4b38b0e675cc575c8eb73583a4130cbe50042b1 100755
(executable)
--- a/
scripts/lttng-analyses/pylint.sh
+++ b/
scripts/lttng-analyses/pylint.sh
@@
-1,6
+1,6
@@
-#!/bin/
sh -exu
+#!/bin/
bash
#
#
-# Copyright (C) 20
15 -
Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 20
20
Michael Jeanson <mjeanson@efficios.com>
#
# 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
#
# 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,29
+15,36
@@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -exu
+
+SRCDIR="src/lttng-analyses"
+
+PYTHON3="python3"
+P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build
export LD_LIBRARY_PATH="$BABELTRACE_DIR/lib"
BABELTRACE_DIR=$WORKSPACE/deps/babeltrace/build
export LD_LIBRARY_PATH="$BABELTRACE_DIR/lib"
-export PYTHONPATH="$BABELTRACE_DIR/
python3.4/dist
-packages/"
+export PYTHONPATH="$BABELTRACE_DIR/
lib/python${P3_VERSION}/site
-packages/"
PYENV_HOME=$WORKSPACE/.pyenv/
# Delete previously built virtualenv
PYENV_HOME=$WORKSPACE/.pyenv/
# Delete previously built virtualenv
-if [ -d
$PYENV_HOME
]; then
- rm -rf
$PYENV_HOME
+if [ -d
"$PYENV_HOME"
]; then
+ rm -rf
"$PYENV_HOME"
fi
# Create virtualenv and install necessary packages
fi
# Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p
python3 $PYENV_HOME
+virtualenv --system-site-packages -p
$PYTHON3 "$PYENV_HOME"
-set +u
-. $PYENV_HOME/bin/activate
-set -u
+set +ux
+# shellcheck disable=SC1090
+. "$PYENV_HOME/bin/activate"
+set -ux
pip install --quiet pylint
pip install --quiet pylint
-pip install --quiet pep8
-pep8 lttnganalyses | tee pep8.out
-pylint -f parseable --ignore="_version.py" lttnganalyses | tee pylint.out
+cd "$SRCDIR"
+
+pylint -f parseable --ignore="_version.py" --disable=C0111 lttnganalyses | tee "$WORKSPACE/pylint.out"
This page took
0.02641 seconds
and
4
git commands to generate.