Skip to content

Commit

Permalink
ci(python): exclude refurb 183 and run --explain on returned refurb e…
Browse files Browse the repository at this point in the history
…rror codes
  • Loading branch information
vpayno committed Apr 9, 2024
1 parent 6a51ac3 commit 9c2f6bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/citools/python/python-lint-refurb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
Expand Down

0 comments on commit 9c2f6bf

Please sign in to comment.