forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlint.sh
executable file
·43 lines (33 loc) · 1.02 KB
/
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
#!/bin/bash
echo "inside $0"
source activate pandas
RET=0
if [ "$LINT" ]; then
# pandas/rpy is deprecated and will be removed.
# pandas/src is C code, so no need to search there.
echo "Linting *.py"
flake8 pandas --filename '*.py' --exclude pandas/rpy,pandas/src
echo "Linting *.py DONE"
echo "Linting *.pyx"
flake8 pandas --filename '*.pyx' --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
echo "Linting *.pyx DONE"
echo "Linting *.pxi.in"
for path in 'src'
do
echo "linting -> pandas/$path"
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
if [ $? -ne "0" ]; then
RET=1
fi
done
echo "Linting *.pxi.in DONE"
echo "Check for invalid testing"
grep -r -E --include '*.py' --exclude nosetester.py --exclude testing.py '(numpy|np)\.testing' pandas
if [ $? = "0" ]; then
RET=1
fi
echo "Check for invalid testing DONE"
else
echo "NOT Linting"
fi
exit $RET