1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-01 19:02:31 +01:00

dev_scripts: pylint: ignore errors per subdir

Add the ability to ignore specific pylint errors on per-subpackage or
per-module basis by adding a plugin that checks the path of the module
against pre-defined sub-paths and inserts disable tags as needed.
This commit is contained in:
Sergei Trofimov
2018-07-05 16:37:28 +01:00
committed by Marc Bonnici
parent 651adaaa57
commit 88c5005b38
2 changed files with 50 additions and 4 deletions

View File

@@ -42,12 +42,13 @@ if [ "$result" == "2" ]; then
fi
THIS_DIR="`dirname \"$0\"`"
CWD=$PWD
pushd $THIS_DIR > /dev/null
if [[ "$target" == "" ]]; then
pushd $THIS_DIR/.. > /dev/null
for dir in "${DEFAULT_DIRS[@]}"; do
pylint --rcfile extras/pylintrc $dir
PYTHONPATH=. pylint --rcfile ../extras/pylintrc --load-plugins pylint_plugins $CWD/$dir
done
popd > /dev/null
else
pylint --rcfile $THIS_DIR/../extras/pylintrc $target
PYTHONPATH=. pylint --rcfile ../extras/pylintrc --load-plugins pylint_plugins $CWD/$target
fi
popd > /dev/null