summaryrefslogtreecommitdiff
path: root/tools/run-pylint
blob: 0b7c16d4bacb546af885413a0055abf664a6ead2 (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=( bin/cloud-init $(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[@]}"