Add pep8 script
This commit is contained in:
parent
a0bf68f3c4
commit
acd24c0796
6
Makefile
6
Makefile
|
@ -40,8 +40,12 @@ lint:
|
|||
python3 /usr/bin/flake8 bin/$(PYTHONSRC)-tui --ignore=F403
|
||||
python3 /usr/bin/flake8 --exclude $(PYTHONSRC)/tests/ $(PYTHONSRC) --ignore=F403
|
||||
|
||||
pep8:
|
||||
echo "Running $Q tests..."
|
||||
@$(CWD)/scripts/run-pep8
|
||||
|
||||
pyflakes3:
|
||||
echo "Running pyflakes tests..."
|
||||
echo "Running $Q tests..."
|
||||
@$(CWD)/scripts/run-pyflakes3
|
||||
|
||||
unit:
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
# This file is part of subiquity. See LICENSE file for copyright and license info.
|
||||
|
||||
pycheck_dirs=(
|
||||
"console_conf/"
|
||||
"subiquity/"
|
||||
"subiquitycore/"
|
||||
"tests/"
|
||||
)
|
||||
bin_files=( )
|
||||
CR="
|
||||
"
|
||||
[ "$1" = "-v" ] && { verbose="$1"; shift; } || verbose=""
|
||||
|
||||
set -f
|
||||
if [ $# -eq 0 ]; then unset IFS
|
||||
IFS="$CR"
|
||||
files=( "${bin_files[@]}" "${pycheck_dirs[@]}" )
|
||||
unset IFS
|
||||
else
|
||||
files=( "$@" )
|
||||
fi
|
||||
|
||||
myname=${0##*/}
|
||||
cmd=( "${myname#run-}" $verbose "${files[@]}" )
|
||||
echo "Running: " "${cmd[@]}" 1>&2
|
||||
exec "${cmd[@]}"
|
||||
|
||||
# vi: ts=4 expandtab syntax=sh
|
Loading…
Reference in New Issue