-
Notifications
You must be signed in to change notification settings - Fork 42
/
entrypoint.sh
executable file
·114 lines (82 loc) · 1.73 KB
/
entrypoint.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh -l
# Parameters
#
# $1 - python-root-list
# $2 - use-pylint
# $3 - use-pycodestyle
# $4 - use-flake8
# $5 - use-black
# $6 - use-mypy
# $7 - use-isort
# $8 - extra-pylint-options
# $9 - extra-pycodestyle-options
# ${10} - extra-flake8-options
# ${11} - extra-black-options
# ${12} - extra-mypy-options
# ${13} - extra-isort-options
if [ "$2" = true ] ; then
echo Running: pylint $8 $1
pylint $8 $1
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "Pylint ok"
else
echo "Pylint error"
exit $exit_code
fi
fi
if [ "$3" = true ] ; then
echo Running: pycodestyle $9 $1
pycodestyle $9 $1
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "pycodestyle ok"
else
echo "pycodestyle error"
exit $exit_code
fi
fi
if [ "$4" = true ] ; then
echo Running: flake8 ${10} $1
flake8 ${10} $1
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "Flake8 ok"
else
echo "Flake8 error"
exit $exit_code
fi
fi
if [ "$5" = true ] ; then
echo Running: black --check ${11} $1
black --check ${11} $1
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "Black ok"
else
echo "Black error"
exit $exit_code
fi
fi
if [ "$6" = true ] ; then
echo Running: mypy ${12} $1
mypy ${12} $1
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "mypy ok"
else
echo "mypy error"
exit $exit_code
fi
fi
if [ "$7" = true ] ; then
echo Running: isort ${13} $1 -c --diff
isort ${13} $1 -c --diff
exit_code=$?
if [ "$exit_code" = "0" ]; then
echo "isort ok"
else
echo "isort error"
exit $exit_code
fi
fi