mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
github/action: improve the clippy run
freebsd was detecting issues the linux jobs were not
This commit is contained in:
parent
503f0101ea
commit
955b100517
1 changed files with 8 additions and 1 deletions
9
.github/workflows/code-quality.yml
vendored
9
.github/workflows/code-quality.yml
vendored
|
|
@ -137,7 +137,14 @@ jobs:
|
|||
extra="${extra} --workspace"
|
||||
;;
|
||||
esac
|
||||
S=$(cargo clippy --all-targets $extra --tests -pcoreutils -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; }
|
||||
# * determine sub-crate utility list (similar to FreeBSD workflow)
|
||||
if [[ "${{ matrix.job.features }}" == "all" ]]; then
|
||||
UTILITY_LIST="$(./util/show-utils.sh --all-features)"
|
||||
else
|
||||
UTILITY_LIST="$(./util/show-utils.sh --features ${{ matrix.job.features }})"
|
||||
fi
|
||||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
||||
S=$(cargo clippy --all-targets $extra --tests --benches -pcoreutils ${CARGO_UTILITY_LIST_OPTIONS} -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; }
|
||||
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
|
||||
|
||||
style_spellcheck:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue