[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-03-11 07:45:08 +01:00 committed by Markus Heiser
parent 707d6270c8
commit 8205f170ff
155 changed files with 166 additions and 258 deletions

18
utils/lib_sxng_test.sh Normal file → Executable file
View file

@ -1,3 +1,8 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: AGPL-3.0-or-later
[[ -z "${PYLINT_OPTIONS}" ]] && PYLINT_OPTIONS="-j 0 --rcfile .pylintrc"
test.help(){
cat <<EOF
test.:
@ -22,20 +27,19 @@ test.yamllint() {
test.pylint() {
# shellcheck disable=SC2086
( set -e
build_msg TEST "[pylint] \$PYLINT_FILES"
pyenv.activate
python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
build_msg TEST "[pylint] \$PYLINT_FILES"
pylint ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
"${PYLINT_FILES[@]}"
build_msg TEST "[pylint] searx/engines"
python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARXNG_DISABLE_OPTION}" \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
pylint ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--additional-builtins="traits,supported_languages,language_aliases,logger,categories" \
searx/engines
build_msg TEST "[pylint] searx tests"
python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
pylint ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--disable="${PYLINT_SEARXNG_DISABLE_OPTION}" \
--ignore=searx/engines \
searx tests