Skip to content

Commit ee00540

Browse files
authored
Merge pull request statsmodels#5210 from bashtage/fix-lint-sh
BLD/MAINT: Ensure master is available when linting in CI
2 parents 8766afb + ea472da commit ee00540

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ if [ "$LINT" == true ]; then
4747
fi
4848

4949
# Tests any new python files
50-
NEW_FILES=$(git diff master --name-status -u -- "*.py" | grep ^A | cut -c 3- | paste -sd " " -)
50+
git fetch --unshallow --quiet
51+
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
52+
git fetch origin --quiet
53+
NEW_FILES=$(git diff origin/master --name-status -u -- "*.py" | grep ^A | cut -c 3- | paste -sd " " -)
5154
if [ -n "$NEW_FILES" ]; then
5255
echo "Linting newly added files with strict rules"
5356
flake8 --isolated $(eval echo $NEW_FILES)

0 commit comments

Comments
 (0)