Browse Source

[CI] run-pylint: Exclude .py from external sources

- exclude .py from glibc, LTP, etc.
- ignore return code of `command` (it's handled later)
Isaku Yamahata 4 years ago
parent
commit
e3c62c7a9f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      .ci/run-pylint

+ 5 - 1
.ci/run-pylint

@@ -5,12 +5,16 @@ set -e
 cd "$(git rev-parse --show-toplevel)"
 
 # pylint3 was replaced with pylint from Ubuntu 19.10
-PYLINT=$(command -v pylint3)
+PYLINT=$(command -v pylint3) || true
 if [ -z "$PYLINT" ]; then
     PYLINT=$(command -v pylint)
 fi
 
 find . -name \*.py \
+    -and -not -path ./Pal/lib/crypto/mbedtls/\* \
+    -and -not -path ./LibOS/glibc-build/\* \
+    -and -not -path ./LibOS/glibc-\?.\?\?/\* \
+    -and -not -path ./LibOS/shim/test/apps/ltp/opt/\* \
     -and -not -path ./LibOS/shim/test/apps/ltp/src/\* \
 | sed 's/./\\&/g' \
 | xargs "${PYLINT}" "$@" \