From 4a2f194860c519c191a27d3051d3c3859991dfb9 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 3 Dec 2025 14:10:11 +0100 Subject: [PATCH] run-linters: add --errors-only mode Add `--errors-only` that runs only linters that can detect real errors and all other ignoring the result. --- run-linters | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/run-linters b/run-linters index ae963a7..edb71bb 100755 --- a/run-linters +++ b/run-linters @@ -23,10 +23,18 @@ run_flake8() { run_pylint() { echo "Running pylint..." - pylint $(find * -name '*.py') $PYTHON_SCRIPTS + pylint "$@" $(find * -name '*.py') $PYTHON_SCRIPTS } -run_black -run_isort -run_flake8 -run_pylint +if test "${1-}" = "--errors-only"; then + # Run only linters that can detect real errors (ignore formatting) + run_black || true + run_isort || true + run_flake8 || true + run_pylint --errors-only +else + run_black + run_isort + run_flake8 + run_pylint +fi