summaryrefslogtreecommitdiff
path: root/tools/run-pylint
blob: b74efda9fccb37638727d134e48fdcad4d9c8e7e (plain)
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
#!/bin/bash

if [ $# -eq 0 ]; then
   files=( $(find * -name "*.py" -type f) )
else
   files=( "$@" );
fi 

RC_FILE="pylintrc"
if [ ! -f $RC_FILE ]; then
    RC_FILE="../pylintrc"
fi

cmd=(
    pylint
    --rcfile=$RC_FILE
    --disable=R
    --disable=I
    "${files[@]}"
)

echo -e "\nRunning pylint:"
echo "${cmd[@]}"
"${cmd[@]}"