Skip to content

Commit 006cc4e

Browse files
committed
updated syntax.sh
1 parent a57afb0 commit 006cc4e

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

tests/syntax.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ srcdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1919

2020
cd "$srcdir/..";
2121

22+
# shellcheck disable=SC1091
2223
. ./tests/utils.sh
2324

24-
for x in $(echo *.py *.jy 2>/dev/null); do
25-
isExcluded "$x" && continue
25+
while read -r prog; do
26+
isExcluded "$prog" && continue
2627
if type -P flake8 &> /dev/null; then
27-
echo "flake8 $x"
28-
flake8 --max-line-length=120 --statistics $x
28+
echo "flake8 $prog"
29+
flake8 --max-line-length=120 --statistics "$prog"
2930
echo; hr; echo
3031
fi
3132
for y in pyflakes pychecker; do
32-
if type -P $y &>/dev/null; then
33-
echo "$y $x"
34-
$y $x
33+
if type -P "$y" &>/dev/null; then
34+
echo "$y $prog"
35+
"$y" "$prog"
3536
echo; hr; echo
3637
fi
3738
done
38-
done
39+
done < <(find . -type f -name '*.py' -o -type f -name '*.jy')

0 commit comments

Comments
 (0)