mirror of
https://github.com/searxng/searxng.git
synced 2026-01-01 00:20:02 +00:00
[enh] add test.yamllint - lint yaml files
Usage::
make test.yamllint
./manage test.yamllint
test.yamllint is also added to the `test` makefile target.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
10
manage
10
manage
@@ -29,6 +29,11 @@ pylint.FILES() {
|
||||
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searx_extra tests
|
||||
}
|
||||
|
||||
YAMLLINT_FILES=()
|
||||
while IFS= read -r line; do
|
||||
YAMLLINT_FILES+=("$line")
|
||||
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml')"
|
||||
|
||||
PYLINT_SEARX_DISABLE_OPTION="\
|
||||
I,C,R,\
|
||||
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
|
||||
@@ -391,6 +396,11 @@ pypi.upload.test() {
|
||||
pyenv.cmd twine upload -r testpypi "${PYDIST}"/*
|
||||
}
|
||||
|
||||
test.yamllint() {
|
||||
build_msg TEST "[pylint] \$PYLINT_FILES"
|
||||
pyenv.cmd yamllint --format parsable "${YAMLLINT_FILES[@]}"
|
||||
}
|
||||
|
||||
test.pylint() {
|
||||
# shellcheck disable=SC2086
|
||||
( set -e
|
||||
|
||||
Reference in New Issue
Block a user