mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
gitlab-ci: port lint_* job to Debian/bookworm for stability
This saves us from being surprised by new rules in pylint, pyflakes, etc like: https://gitlab.com/FestplattenSchnitzel/fdroidserver/-/jobs/3895256515
This commit is contained in:
parent
ae2b33dab3
commit
4282d34343
@ -182,13 +182,29 @@ gradlew-fdroid:
|
|||||||
|
|
||||||
# Run all the various linters and static analysis tools.
|
# Run all the various linters and static analysis tools.
|
||||||
lint_format_safety_bandit_checks:
|
lint_format_safety_bandit_checks:
|
||||||
image: alpine:3.16
|
image: debian:bookworm-slim
|
||||||
variables:
|
variables:
|
||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache bash build-base dash ca-certificates gcc git python3 python3-dev
|
- apt-get update
|
||||||
- python3 -m ensurepip
|
- apt-get -y install --no-install-recommends
|
||||||
- $pip install Babel bandit pycodestyle pyflakes pylint safety
|
bash
|
||||||
|
ca-certificates
|
||||||
|
dash
|
||||||
|
gcc
|
||||||
|
gettext
|
||||||
|
git
|
||||||
|
make
|
||||||
|
pycodestyle
|
||||||
|
pyflakes3
|
||||||
|
pylint
|
||||||
|
python3-babel
|
||||||
|
python3-dev
|
||||||
|
python3-git
|
||||||
|
python3-nose
|
||||||
|
python3-pip
|
||||||
|
python3-yaml
|
||||||
|
- $pip install --break-system-packages bandit safety
|
||||||
- export EXITVALUE=0
|
- export EXITVALUE=0
|
||||||
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
||||||
- ./hooks/pre-commit || set_error
|
- ./hooks/pre-commit || set_error
|
||||||
@ -206,7 +222,6 @@ lint_format_safety_bandit_checks:
|
|||||||
tests/*.py
|
tests/*.py
|
||||||
tests/*.TestCase
|
tests/*.TestCase
|
||||||
|| set_error
|
|| set_error
|
||||||
- apk add --no-cache gettext make
|
|
||||||
- make -C locale compile || set_error
|
- make -C locale compile || set_error
|
||||||
- rm -f locale/*/*/*.mo
|
- rm -f locale/*/*/*.mo
|
||||||
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
|
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
|
||||||
|
@ -52,8 +52,6 @@ confidence = ["HIGH", "INFERENCE"]
|
|||||||
|
|
||||||
# TODO many of these could be fixed if someone wants to spend the time
|
# TODO many of these could be fixed if someone wants to spend the time
|
||||||
disable = [
|
disable = [
|
||||||
"broad-exception-caught",
|
|
||||||
"broad-exception-raised",
|
|
||||||
"consider-iterating-dictionary",
|
"consider-iterating-dictionary",
|
||||||
"consider-using-sys-exit",
|
"consider-using-sys-exit",
|
||||||
"invalid-name",
|
"invalid-name",
|
||||||
@ -65,7 +63,6 @@ disable = [
|
|||||||
"no-else-raise",
|
"no-else-raise",
|
||||||
"no-else-return",
|
"no-else-return",
|
||||||
"no-member",
|
"no-member",
|
||||||
"pointless-exception-statement",
|
|
||||||
"subprocess-run-check",
|
"subprocess-run-check",
|
||||||
"use-dict-literal",
|
"use-dict-literal",
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user