#!/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[@]}"