File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ echo "inside $0"
4
4
5
5
RET=0
6
6
7
- if [ " $LINT " = true ]; then
7
+ if [ " $LINT " == true ]; then
8
+ echo " Linting all files with limited rules"
8
9
flake8 statsmodels
9
10
if [ $? -ne " 0" ]; then
10
11
RET=1
11
12
fi
12
13
13
14
# Run with --isolated to ignore config files, the files included here
14
15
# pass _all_ flake8 checks
16
+ echo " Linting known clean files with strict rules"
15
17
flake8 --isolated \
16
18
statsmodels/info.py \
17
19
statsmodels/resampling/ \
@@ -24,6 +26,15 @@ if [ "$LINT" = true ]; then
24
26
RET=1
25
27
fi
26
28
29
+ # Tests any new python files
30
+ NEW_FILES=$( git diff master --name-status -u -- " *.py" | grep ^A | cut -c 3- | paste -sd " " -)
31
+ if [ -n " $NEW_FILES " ]; then
32
+ echo " Linting newly added files with strict rules"
33
+ flake8 --isolated $( eval echo $NEW_FILES )
34
+ if [ $? -ne " 0" ]; then
35
+ RET=1
36
+ fi
37
+ fi
27
38
fi
28
39
29
40
exit $RET
You can’t perform that action at this time.
0 commit comments