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
This commit is contained in:
parent
52822fea02
commit
9ce614ad84
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user