summaryrefslogtreecommitdiffstats
path: root/bin/check
blob: f32494e45ab391f32fee338f21b4c2113717455a (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
#! /bin/sh

# This script runs pychecker on the SCons source and creates a file called
# checks.txt with the results. It must be run in the src/engine directory.

base=`basename $PWD`
if [ "$base" != "engine" ]; then
   echo "You must run this script from the engine directory."
   exit
fi

DEVDIR=../../doc/developer
SRCFILE=../../bin/files
CHKFILE=checks.txt

rm -f $CHKFILE
for f in `cat $SRCFILE` ; do
   echo >> $CHKFILE
   echo " --- $f ---" >> $CHKFILE
   env PYTHONPATH=. pychecker -T -z -Z --deprecated $f >> $CHKFILE
done

if [ -e $CHKFILE ]; then
   sed -e "s|$PWD/||" $CHKFILE > /tmp/tmpchk
   mv -f /tmp/tmpchk $CHKFILE
fi