-
Notifications
You must be signed in to change notification settings - Fork 3
/
lint.sh
59 lines (46 loc) · 768 Bytes
/
lint.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#from https://github.com/Aradhya-Tripathi/fire-watch
#!bin/bash
error="\e[1;31m[ERROR]\e[0m"
execution="\e[0;36m[INFO]\e[0m"
echo -e "$execution [...]"
var=$(black analysis/ --diff | grep " " -c)
echo $var
if [ $var -eq 0 ];
then
echo "$execution All clean!"
else
black analysis/ --diff
exit 1
fi
echo $var
if [ $var -eq 0 ];
then
echo "$execution All clean!"
else
black models/ --diff
exit 1
fi
echo $var
if [ $var -eq 0 ];
then
echo "$execution All clean!"
else
black tests/ --diff
exit 1
fi
echo $var
if [ $var -eq 0 ];
then
echo "$execution All clean!"
else
black back.py --diff
exit 1
fi
echo $var
if [ $var -eq 0 ];
then
echo "$execution All clean!"
else
black sendmail.py --diff
exit 1
fi