Skip to content

Commit f21269a

Browse files
committed
Work around code duplication warning in pylint
Use `find` to sort scripts/abi_check.py into a separate invocation of pylint. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
1 parent 86545b4 commit f21269a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/check-python-files.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ elif [ "$1" = "--can-mypy" ]; then
5555
fi
5656

5757
echo 'Running pylint ...'
58-
$PYTHON -m pylint framework/scripts/*.py framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py || {
58+
# Temporary workaround while moving the bulk of abi_check.py to the framework
59+
# Check abi_check.py separately from the rest of the files, so it's not flagged
60+
# for code duplication.
61+
find framework/scripts/*.py framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py \
62+
-path scripts/abi_check.py \
63+
-exec $PYTHON -m pylint {} + \
64+
-o -exec $PYTHON -m pylint {} + || {
5965
echo >&2 "pylint reported errors"
6066
ret=1
6167
}

0 commit comments

Comments
 (0)