-
Notifications
You must be signed in to change notification settings - Fork 7
/
pre-commit-check
executable file
·47 lines (38 loc) · 798 Bytes
/
pre-commit-check
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
#!/usr/bin/env bash -x
if black firecrown/ examples/ tests/; then
echo "black ok"
else
echo "black failed"
exit 1
fi
if flake8 firecrown/ examples/ tests/; then
echo "flake8 ok"
else
echo "flake8 failed"
exit 1
fi
if pylint firecrown; then
echo "pylint ok for firecrown"
else
echo "pylint failed for firecrown"
exit 1
fi
if pylint --rcfile firecrown/models/pylintrc firecrown/models; then
echo "pylint ok for firecrown.models"
else
echo "pylint failed for firecrown.models"
exit 1
fi
if pylint --rcfile tests/pylintrc tests; then
echo "pylint ok for tests"
else
echo "pylint failed for tests"
exit 1
fi
if mypy -p firecrown -p examples -p tests; then
echo "mypy ok"
else
echo "mypy failed"
exit 1
fi
python -m pytest --runslow -vv --integration tests