-
Notifications
You must be signed in to change notification settings - Fork 29
/
run-pylint.sh
executable file
·51 lines (45 loc) · 1.39 KB
/
run-pylint.sh
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
48
49
50
51
#! /bin/sh
dirname=$(dirname $(readlink -fe $0))
export PYTHONPATH=$PYTHONPATH:commonl
if [ $# -gt 0 ]; then
for filename in "$@"; do
readlink -fe $filename
filedirname=$(dirname $(readlink -fe $filename))
if echo $filedirname | grep /ttbd; then
python_add=$PWD/ttbd/ttbl
else
python_add=$PWD/tcfl
fi
PYTHONPATH=$PYTHONPATH:$PWD/commonl:$python_add \
pylint --rcfile=$dirname/.pylintrc $filename
done
exit
fi
# FIXME: figure out a way to run the ttbd and zephyr configuration
# files in the namespace they will be included on to avoid all the
# issues with undefineds
cd $dirname
# Utils
python3-pylint --rcfile=.pylintrc lint-all.py .lint.*.py
PYTHONPATH=$PYTHONPATH:$PWD/commonl:$PWD/tcfl \
pylint --rcfile=$dirname/.pylintrc \
conf.py \
setup.py \
tcf-run-mk-zephyr-boards-by-toolchain.py
# Client
PYTHONPATH=$PYTHONPATH:$PWD/commonl:$PWD/tcfl \
pylint --rcfile=$dirname/.pylintrc \
commonl \
examples/*.py \
zephyr/*.py sketch/*.py \
tcfl
# Server
PYTHONPATH=$PYTHONPATH:$PWD/commonl:$PWD/ttbd/ttbl \
pylint --rcfile=$dirname/.pylintrc \
ttbd/*.py \
ttbd/ttbl ttbd/zephyr/* ttbd/tests/*.py
# Docs
PYTHONPATH=$PYTHONPATH:$PWD/commonl:$PWD/ttbd/ttbl \
pylint --rcfile=$dirname/.pylintrc \
doc/training/*.py \
tests/*.py