scripts/pylint/do_pylint.sh
changeset 2071 0aa24d8655ac
parent 853 062290a3b3cf
child 2328 e077dc264dff
equal deleted inserted replaced
2070:9555be8634a3 2071:0aa24d8655ac
    15 
    15 
    16 # Set some environmental variables for pylint and run it on Melange code
    16 # Set some environmental variables for pylint and run it on Melange code
    17 # To disable some of the checks use options listed below:
    17 # To disable some of the checks use options listed below:
    18 # disable unused imports: --disable-msg=W0611
    18 # disable unused imports: --disable-msg=W0611
    19 # disable TODO: --disable-msg=W0511
    19 # disable TODO: --disable-msg=W0511
       
    20 # disable cyclic imports: --disable-msg=R0401
    20 # disable report: --reports=no
    21 # disable report: --reports=no
    21 # disable similarity check: --disable-checker=similarities
    22 # disable similarity check: --disable-checker=similarities
    22 #
    23 #
    23 # Checks listed above are disabled in silent mode 
    24 # Checks listed above are disabled in silent mode 
    24 # which can be run using --silent argument
    25 # which can be run using --silent argument
    25 
    26 
    26 SILENT_ARGS=""
    27 SILENT_ARGS=""
    27 ARGS=( "$@" )
    28 ARGS=( "$@" )
    28 
    29 
    29 if [ "$1" == "--silent" ]; then
    30 if [ "$1" == "--silent" ]; then
    30   SILENT_ARGS="--disable-msg=W0611 --disable-msg=W0511 --reports=no --disable-checker=similarities"
    31   SILENT_ARGS="--disable-msg=W0511,R0401 --reports=no --disable-checker=similarities"
    31   ARGS[0]=""
    32   ARGS[0]=""
    32 fi
    33 fi
    33 
    34 
    34 PROJ_DIR=$(dirname "$0")/../..
    35 PROJ_DIR=$(dirname "$0")/../..
    35 PROJ_DIR=$(cd "$PROJ_DIR"; pwd)
    36 PROJ_DIR=$(cd "$PROJ_DIR"; pwd)