forked from Mirror/pmbootstrap
CI: ruff: run ALLL the checks before failing (MR 2448)
So we don't go through the pain of pushing 3 times to get 3 different ruff failures in CI. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
8627ee7e73
commit
6066772ca8
1 changed files with 7 additions and 3 deletions
10
.ci/ruff.sh
10
.ci/ruff.sh
|
@ -8,15 +8,19 @@ if [ "$(id -u)" = 0 ]; then
|
||||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
DID_FAIL=0
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# __init__.py with additional ignore:
|
# __init__.py with additional ignore:
|
||||||
# F401: imported, but not used
|
# F401: imported, but not used
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
ruff check --ignore "F401" $(find . -not -path '*/venv/*' -name '__init__.py')
|
ruff check --ignore "F401" $(find . -not -path '*/venv/*' -name '__init__.py') || DID_FAIL=1
|
||||||
|
|
||||||
# Check all other files
|
# Check all other files
|
||||||
ruff check --exclude=__init__.py .
|
ruff check --exclude=__init__.py . || DID_FAIL=1
|
||||||
|
|
||||||
# Check formatting
|
# Check formatting
|
||||||
ruff format --diff
|
ruff format --diff || DID_FAIL=1
|
||||||
|
|
||||||
|
exit $DID_FAIL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue