From 9ce614ad84edaec45e2c011b12762e0e3ba3e4ae Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Fri, 15 Feb 2019 19:04:19 -0800 Subject: [PATCH] Speed up pylint by using multiple cores This patch tells pylint to spawn multiple sub-processes to review the code. The number of sub-processes is default to the number of cpu cores/threads. On systems with multiple cores this will speed up the checks. It adds the '-j 0' flag to the pylint run. Change-Id: I57bb487542417ded264462996b89fbef9fc1df59 --- tools/coding-checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/coding-checks.sh b/tools/coding-checks.sh index 47b455b999..92dff3141e 100755 --- a/tools/coding-checks.sh +++ b/tools/coding-checks.sh @@ -48,7 +48,7 @@ run_pylint () { echo "Running pylint..." echo "You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~1, this change only)..." if [ -n "${files}" ]; then - pylint --max-nested-blocks 7 --extension-pkg-whitelist netifaces --rcfile=.pylintrc --output-format=colorized ${files} + pylint -j 0 --max-nested-blocks 7 --extension-pkg-whitelist netifaces --rcfile=.pylintrc --output-format=colorized ${files} else echo "No python changes in this commit, pylint check not required." exit 0