mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-03 21:05:39 +00:00
Merge pull request #3101 from sbutcher-arm/change-used-pylint-2.16
Backport 2.16: Change the use of pylint to optionally use pylint3
This commit is contained in:
commit
b5695d9997
|
@ -105,7 +105,16 @@ echo
|
||||||
print_version "python" "--version" "" "head -n 1"
|
print_version "python" "--version" "" "head -n 1"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
print_version "pylint3" "--version" "" "sed /^.*config/d" "grep pylint"
|
# Find the installed version of Pylint. Installed as a distro package this can
|
||||||
|
# be pylint3 and as a PEP egg, pylint. In test scripts We prefer pylint over
|
||||||
|
# pylint3
|
||||||
|
if type pylint >/dev/null 2>/dev/null; then
|
||||||
|
print_version "pylint" "--version" "" "sed /^.*config/d" "grep pylint"
|
||||||
|
elif type pylint3 >/dev/null 2>/dev/null; then
|
||||||
|
print_version "pylint3" "--version" "" "sed /^.*config/d" "grep pylint"
|
||||||
|
else
|
||||||
|
echo " * pylint or pylint3: Not found."
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
: ${OPENSSL:=openssl}
|
: ${OPENSSL:=openssl}
|
||||||
|
|
|
@ -1410,7 +1410,13 @@ component_test_zeroize () {
|
||||||
}
|
}
|
||||||
|
|
||||||
support_check_python_files () {
|
support_check_python_files () {
|
||||||
type pylint3 >/dev/null 2>/dev/null
|
# Find the installed version of Pylint. Installed as a distro package this can
|
||||||
|
# be pylint3 and as a PEP egg, pylint.
|
||||||
|
if type pylint >/dev/null 2>/dev/null || type pylint3 >/dev/null 2>/dev/null; then
|
||||||
|
true;
|
||||||
|
else
|
||||||
|
false;
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
component_check_python_files () {
|
component_check_python_files () {
|
||||||
msg "Lint: Python scripts"
|
msg "Lint: Python scripts"
|
||||||
|
|
|
@ -9,4 +9,15 @@
|
||||||
# Run 'pylint' on Python files for programming errors and helps enforcing
|
# Run 'pylint' on Python files for programming errors and helps enforcing
|
||||||
# PEP8 coding standards.
|
# PEP8 coding standards.
|
||||||
|
|
||||||
pylint3 -j 2 scripts/*.py tests/scripts/*.py
|
# Find the installed version of Pylint. Installed as a distro package this can
|
||||||
|
# be pylint3 and as a PEP egg, pylint. We prefer pylint over pylint3
|
||||||
|
if type pylint >/dev/null 2>/dev/null; then
|
||||||
|
PYLINT=pylint
|
||||||
|
elif type pylint3 >/dev/null 2>/dev/null; then
|
||||||
|
PYLINT=pylint3
|
||||||
|
else
|
||||||
|
echo 'Pylint was not found.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$PYLINT -j 2 scripts/*.py tests/scripts/*.py
|
||||||
|
|
Loading…
Reference in a new issue