blob: ce955328288df9994e3d0f28d54c2dc1f8a9a7b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#! /bin/sh
# Python style checks.
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
cd ..
# Check Python coding standards: check for tab characters.
egrep ' ' `find . -name '*.py'` |
sed -e 's/:.*//' \
-e '/__init__.py/d' \
-e '/src\/docs\/tools\/doxypy.py/d' |
sort -u |
sed 's/^/ /' > $t
test -s $t && {
echo '[tab] characters appear in Python scripts:'
cat $t
}
# Check Python coding standards: check for trailing semi-colons.
# Don't check too widely, there are third-party tools that fail this test as
# well as scripts in this directory that output C code, and so fail the test.
egrep ';$' `find lang test -name '*.py'`> $t
test -s $t && {
echo 'trailing semi-colons in selected Python code:'
cat $t
}
|