forked from tabacha/ProSafeLinux
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck-syntax.sh
More file actions
executable file
·45 lines (34 loc) · 768 Bytes
/
check-syntax.sh
File metadata and controls
executable file
·45 lines (34 loc) · 768 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
FIXME=W0511
UNUSED_ARG=W0613
EXCEPTION_TYPE=W0702
INSTANCE_ATTRIBUTE=R0902
METHOD_FUNCTION=R0201
ABSTRACT=W0223
LOG=/tmp/psl_check_syntax.log
if [ -f $LOG ] ; then
echo Logfile $LOG exists, please remove first
exit 1
fi
pylint psl.py -d $UNUSED_ARG >$LOG 2>&1
M=$?
if [ "$M" != "0" ] ; then
cat $LOG
fi
pylint -d $FIXME -d $UNUSED_ARG -d $EXCEPTION_TYPE \
-d $INSTANCE_ATTRIBUTE -d $METHOD_FUNCTION \
-d $ABSTRACT psl_typ.py >$LOG 2>&1
T=$?
if [ "$T" != "0" ] ; then
cat $LOG
fi
pylint -d $FIXME -d $UNUSED_ARG -d $EXCEPTION_TYPE \
-d $INSTANCE_ATTRIBUTE psl_class.py >$LOG 2>&1
C=$?
if [ "$C" != "0" ] ; then
cat $LOG
fi
rm $LOG
if [ "$M" == "0" -a "$T" == "0" -a "$C" == "0" ] ; then
echo Okay
fi