-
Notifications
You must be signed in to change notification settings - Fork 420
/
pylint
executable file
·47 lines (40 loc) · 1.1 KB
/
pylint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Changes here might also be appropriate for ./pytest
set -eu
with_pylint=$(cat config/config.var/with-pylint)
case "$with_pylint" in
yes) ;;
no)
echo "./pylint: doing nothing given ./configure --with-pylint=no" 1>&2
exit 0
;;
maybe)
rc=0
dev/have-pylint || rc=$?
case "$rc" in
0) ;;
1)
echo "./pylint: doing nothing (pylint not found)" 1>&2
exit 0
;;
*) exit "$rc" ;;
esac
;;
*)
printf "./pylint: unexpected config/config.var/with-pylint value %q\n" \
"$with_pylint" 1>&2
exit 2
;;
esac
script_home="$(cd "$(dirname "$0")" && pwd -P)"
testlibdir="$script_home/test/lib"
export PYTHONPATH="$testlibdir${PYTHONPATH: :$PYTHONPATH}"
if test "$#" -eq 0; then
set -x
dev/bup-python -m pylint lib
# unused-wildcard-import: we always "import * from wvpytest"
dev/bup-python -m pylint -d unused-wildcard-import test/lib test/int
else
set -x
exec dev/bup-python -m pylint "$@"
fi