Skip to content

Commit

Permalink
Limit Python linting to files in the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed May 30, 2019
1 parent c7cfd20 commit 3c5254a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/lint/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,10 @@ elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
exit 0
fi

PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") "${@:-.}"
PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=$(IFS=","; echo "${enabled[*]}") $(
if [[ $# == 0 ]]; then
git ls-files "*.py"
else
echo "$@"
fi
)

0 comments on commit 3c5254a

Please sign in to comment.