Skip to content

Commit

Permalink
Don't use parallel jobs for pylint
Browse files Browse the repository at this point in the history
When pylint runs in parallel, it loses the ability to detect duplicated code
across modules. Duplicated code is usually a bad thing, so give pylint the
opportunity to let us know.

This makes pylint slightly slower, but going from 2 threads to 1 does not
make it anywhere close to twice as slow. On my machine, with Python 3.5,
pylint -j2 takes about 12s while single-threaded pylint takes about 16s
of wall clock time.

Signed-off-by: Gilles Peskine <[email protected]>
  • Loading branch information
gilles-peskine-arm committed Oct 14, 2022
1 parent 7ff4766 commit 5d01cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/scripts/check-python-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ elif [ "$1" = "--can-mypy" ]; then
fi

echo 'Running pylint ...'
$PYTHON -m pylint -j 2 scripts/mbedtls_dev/*.py scripts/*.py tests/scripts/*.py || {
$PYTHON -m pylint scripts/mbedtls_dev/*.py scripts/*.py tests/scripts/*.py || {
echo >&2 "pylint reported errors"
ret=1
}
Expand Down

0 comments on commit 5d01cc0

Please sign in to comment.