diff --git a/script/lint b/script/lint index 102dd84a407..b16b92a45b4 100755 --- a/script/lint +++ b/script/lint @@ -4,10 +4,14 @@ cd "$(dirname "$0")/.." if [ "$1" = "--changed" ]; then - export files="`git diff upstream/dev --name-only | grep -e '\.py$'`" + export files="`git diff upstream/dev... --name-only | grep -e '\.py$'`" echo "=================================================" - echo "FILES CHANGED (git diff upstream/dev --name-only)" + echo "FILES CHANGED (git diff upstream/dev... --name-only)" echo "=================================================" + if $files >/dev/null; then + echo "No python file changed" + exit + fi printf "%s\n" $files echo "================" echo "LINT with flake8"