15
15
# $ ./ci/code_checks.sh doctests # run doctests
16
16
17
17
echo " inside $0 "
18
- [[ $LINT ]] || { echo " NOT Linting. To lint use: LINT=true $0 $1 " ; exit 0; }
18
+ [[ $LINT || $1 ]] || { echo " NOT Linting. To lint use: LINT=true $0 $1 " ; exit 0; }
19
19
[[ -z " $1 " || " $1 " == " lint" || " $1 " == " patterns" || " $1 " == " doctests" ]] || { echo " Unkown command $1 . Usage: $0 [lint|patterns|doctests]" ; exit 9999; }
20
20
21
21
source activate pandas
@@ -44,6 +44,17 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
44
44
flake8 pandas/_libs --filename=* .pxi.in,* .pxd --select=E501,E302,E203,E111,E114,E221,E303,E231,E126,F403
45
45
RET=$(( $RET + $? )) ; echo $MSG " DONE"
46
46
47
+ echo " flake8-rst --version"
48
+ flake8-rst --version
49
+
50
+ MSG=' Linting code-blocks in .py docstrings' ; echo $MSG
51
+ flake8-rst pandas
52
+ RET=$(( $RET + $? )) ; echo $MSG " DONE"
53
+
54
+ MSG=' Linting code-blocks in .rst documentation' ; echo $MSG
55
+ flake8-rst doc --filename=* .rst
56
+ RET=$(( $RET + $? )) ; echo $MSG " DONE"
57
+
47
58
# readability/casting: Warnings about C casting instead of C++ casting
48
59
# runtime/int: Warnings about using C number types instead of C++ ones
49
60
# build/include_subdir: Warnings about prefacing included header files with directory
@@ -56,6 +67,9 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
56
67
cpplint --quiet --extensions=c,h --headers=h --recursive --filter=-readability/casting,-runtime/int,-build/include_subdir pandas/_libs/src/* .h pandas/_libs/src/parser pandas/_libs/ujson pandas/_libs/tslibs/src/datetime
57
68
RET=$(( $RET + $? )) ; echo $MSG " DONE"
58
69
70
+ echo " isort --version-number"
71
+ isort --version-number
72
+
59
73
# Imports - Check formatting using isort see setup.cfg for settings
60
74
MSG=' Check import format using isort ' ; echo $MSG
61
75
isort --recursive --check-only pandas
0 commit comments