diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2015-03-10 13:09:31 +0000 |
---|---|---|
committer | Sergei Trofimov <sergei.trofimov@arm.com> | 2015-03-10 13:09:31 +0000 |
commit | a747ec7e4c2ea8a25bfc675f80042eb6600c7050 (patch) | |
tree | 077c0439a89a5c33b9fa1dbf9e81146ca9960d3c /dev_scripts/pep8 |
Initial commit of open source Workload Automation.
Diffstat (limited to 'dev_scripts/pep8')
-rwxr-xr-x | dev_scripts/pep8 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dev_scripts/pep8 b/dev_scripts/pep8 new file mode 100755 index 00000000..25507f38 --- /dev/null +++ b/dev_scripts/pep8 @@ -0,0 +1,22 @@ +#!/bin/bash + +EXCLUDE=wlauto/external/,wlauto/tests +EXCLUDE_COMMA=wlauto/core/bootstrap.py,wlauto/workloads/geekbench/__init__.py +IGNORE=E501,E265,E266,W391 + +if ! hash pep8 2>/dev/null; then + echo "pep8 not found in PATH" + echo "you can install it with \"sudo pip install pep8\"" + exit 1 +fi + +if [[ "$1" == "" ]]; then + THIS_DIR="`dirname \"$0\"`" + pushd $THIS_DIR/.. > /dev/null + pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE wlauto + pep8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g') + popd > /dev/null +else + pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $1 +fi + |