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

Adding daqpower package to static checkers.

This commit is contained in:
Sergei Trofimov 2015-06-08 17:58:23 +01:00
parent 084de2e58c
commit 0c19d75bf4
2 changed files with 17 additions and 3 deletions

View File

@ -1,8 +1,13 @@
#!/bin/bash #!/bin/bash
DEFAULT_DIRS=(
wlauto
wlauto/external/daq_server/src/daqpower
)
EXCLUDE=wlauto/external/,wlauto/tests EXCLUDE=wlauto/external/,wlauto/tests
EXCLUDE_COMMA=wlauto/core/bootstrap.py,wlauto/workloads/geekbench/__init__.py EXCLUDE_COMMA=wlauto/core/bootstrap.py,wlauto/workloads/geekbench/__init__.py
IGNORE=E501,E265,E266,W391 IGNORE=E501,E265,E266,W391,E401,E402,E731
if ! hash pep8 2>/dev/null; then if ! hash pep8 2>/dev/null; then
echo "pep8 not found in PATH" echo "pep8 not found in PATH"
@ -13,7 +18,9 @@ fi
if [[ "$1" == "" ]]; then if [[ "$1" == "" ]]; then
THIS_DIR="`dirname \"$0\"`" THIS_DIR="`dirname \"$0\"`"
pushd $THIS_DIR/.. > /dev/null pushd $THIS_DIR/.. > /dev/null
pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE wlauto for dir in "${DEFAULT_DIRS[@]}"; do
pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $dir
done
pep8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g') pep8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g')
popd > /dev/null popd > /dev/null
else else

View File

@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
DEFAULT_DIRS=(
wlauto
wlauto/external/daq_server/src/daqpower
)
target=$1 target=$1
compare_versions() { compare_versions() {
@ -40,7 +45,9 @@ fi
THIS_DIR="`dirname \"$0\"`" THIS_DIR="`dirname \"$0\"`"
if [[ "$target" == "" ]]; then if [[ "$target" == "" ]]; then
pushd $THIS_DIR/.. > /dev/null pushd $THIS_DIR/.. > /dev/null
pylint --rcfile extras/pylintrc wlauto for dir in "${DEFAULT_DIRS[@]}"; do
pylint --rcfile extras/pylintrc $dir
done
popd > /dev/null popd > /dev/null
else else
pylint --rcfile $THIS_DIR/../extras/pylintrc $target pylint --rcfile $THIS_DIR/../extras/pylintrc $target