diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-05-30 08:33:08 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-05-30 22:36:54 +0200 |
commit | 3c5254a820c892b448dfb42991f6109a032a3730 (patch) | |
tree | 6c0e39faccf6ac954d33a09714038d95d7722889 /test | |
parent | c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc (diff) |
Limit Python linting to files in the repo
Diffstat (limited to 'test')
-rwxr-xr-x | test/lint/lint-python.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lint/lint-python.sh b/test/lint/lint-python.sh index f5b851aeab..a76806003f 100755 --- a/test/lint/lint-python.sh +++ b/test/lint/lint-python.sh @@ -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 +) |