ci: enforce pylint score instead of warning exit bits
lint / lint (push) Successful in 2m16s
test / unit (pull_request) Successful in 1m10s
test / integration (pull_request) Successful in 29s
test / coverage (pull_request) Successful in 1m22s

This commit is contained in:
2026-07-18 02:35:05 +00:00
parent 9d66d1bc49
commit 97492ffacb
+13 -2
View File
@@ -25,8 +25,19 @@ jobs:
- name: Run pylint - name: Run pylint
run: | run: |
# Run pylint on all Python files in the repo # Pylint's normal exit code is nonzero for any emitted finding,
find . -name '*.py' -not -path './.venv/*' -not -path './.git/*' | xargs pylint --fail-under=8.0 # regardless of --fail-under. Preserve the full report but enforce
# the aggregate score this workflow promises.
set +e
find . -name '*.py' -not -path './.venv/*' -not -path './.git/*' \
| xargs pylint --fail-under=8.0 \
| tee /tmp/pylint-output.txt
set -e
SCORE=$(sed -n \
's/^Your code has been rated at \([-0-9.]*\)\/10.*/\1/p' \
/tmp/pylint-output.txt | tail -1)
test -n "$SCORE"
awk -v score="$SCORE" 'BEGIN { exit !(score >= 8.0) }'
- name: Run pyright - name: Run pyright
run: | run: |