epicyon/static_analysis

37 lines
493 B
Plaintext
Raw Normal View History

2020-04-05 09:26:04 +00:00
#!/bin/bash
if [ -f /usr/bin/flake8 ]; then
cmd="/usr/bin/flake8"
else
cmd="python3 -m flake8"
fi
echo "Starting static analysis"
2021-02-03 12:05:23 +00:00
for sourceFile in epicyon/*.py
do
result=$($cmd "$sourceFile")
if [ "$result" ]; then
echo ''
echo "$result"
exit 1
fi
echo -n '.'
done
2020-04-05 09:26:04 +00:00
for sourceFile in *.py
do
result=$($cmd "$sourceFile")
if [ "$result" ]; then
2020-04-05 09:34:31 +00:00
echo ''
2020-04-05 09:26:04 +00:00
echo "$result"
exit 1
fi
2020-04-05 09:34:31 +00:00
echo -n '.'
2020-04-05 09:26:04 +00:00
done
2020-04-05 09:34:31 +00:00
echo ''
2020-04-05 09:26:04 +00:00
echo "Static analysis complete"
exit 0