diff options
Diffstat (limited to 'tools/run-flake8')
-rwxr-xr-x | tools/run-flake8 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/run-flake8 b/tools/run-flake8 new file mode 100755 index 00000000..0021cdb9 --- /dev/null +++ b/tools/run-flake8 @@ -0,0 +1,17 @@ +#!/bin/bash + +CR=" +" +pycheck_dirs=( "cloudinit/" "tests/" "tools/" "setup.py" ) + +set -f +if [ $# -eq 0 ]; then + files=( "${pycheck_dirs[@]}" ) +else + files=( "$@" ) +fi + +cmd=( "python3" -m "flake8" "${files[@]}" ) + +echo "Running: " "${cmd[@]}" 1>&2 +exec "${cmd[@]}" |