From 9c2f6bff9c142ade498639d64ef8239610ef458e Mon Sep 17 00:00:00 2001 From: Victor Payno Date: Mon, 8 Apr 2024 18:40:31 -0700 Subject: [PATCH] ci(python): exclude refurb 183 and run --explain on returned refurb error codes --- .github/citools/python/python-lint-refurb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/citools/python/python-lint-refurb b/.github/citools/python/python-lint-refurb index 08aa20d9..8672574c 100755 --- a/.github/citools/python/python-lint-refurb +++ b/.github/citools/python/python-lint-refurb @@ -20,10 +20,19 @@ main() { print_ruler # shellcheck disable=SC2048,SC2068,SC2086 - run_command refurb ${@:-./src} + run_command refurb --quiet --ignore 183 ${@:-./src} print_ruler + local -a codes + local code + # shellcheck disable=SC2048,SC2068,SC2086 + mapfile -t codes < <(refurb --quiet --ignore 183 ${@:-./src} |& sed -r -e 's/^.*\[(FURB[0-9]+)\].*$/\1/g') + for code in "${codes[@]}"; do + run_command refurb --explain "${code}" + print_ruler + done + echo Exit code: "${retval}" return "${retval}" }