forked from indymedia/epicyon
29 lines
411 B
Bash
Executable File
29 lines
411 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -f /usr/bin/flake8 ]; then
|
|
cmd="/usr/bin/flake8"
|
|
else
|
|
cmd="python3 -m flake8"
|
|
fi
|
|
|
|
echo "Starting static analysis"
|
|
|
|
for sourceFile in *.py
|
|
do
|
|
if [[ "$sourceFile" == 'blurhash.py' ]]; then
|
|
continue
|
|
fi
|
|
result=$($cmd "$sourceFile")
|
|
if [ "$result" ]; then
|
|
echo ''
|
|
echo "$result"
|
|
exit 1
|
|
fi
|
|
echo -n '.'
|
|
done
|
|
|
|
echo ''
|
|
echo "Static analysis complete"
|
|
|
|
exit 0
|