File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,27 @@ filter_vendored() {
2424 awk ' BEGIN{RS=""; ORS="\n\n"} !/\/noodles\/|\/vendor\/|`noodles-|`lexical-/'
2525}
2626
27- cargo clippy " ${PKG_ARGS[@]} " --all-targets --color=never -- -D warnings 2> >( filter_vendored >&2 )
27+ CLIPPY_STDERR=" $( mktemp) "
28+ FILTERED_STDERR=" $( mktemp) "
29+ cleanup () {
30+ rm -f " $CLIPPY_STDERR " " $FILTERED_STDERR "
31+ }
32+ trap cleanup EXIT
33+
34+ set +e
35+ cargo clippy " ${PKG_ARGS[@]} " --all-targets --color=never -- -D warnings 2> " $CLIPPY_STDERR "
36+ CLIPPY_STATUS=$?
37+ set -e
38+
39+ filter_vendored < " $CLIPPY_STDERR " > " $FILTERED_STDERR "
40+ if [[ -s " $FILTERED_STDERR " ]]; then
41+ cat " $FILTERED_STDERR " >&2
42+ elif [[ " $CLIPPY_STATUS " -ne 0 ]]; then
43+ cat " $CLIPPY_STDERR " >&2
44+ fi
45+
46+ if [[ " $CLIPPY_STATUS " -ne 0 ]]; then
47+ exit " $CLIPPY_STATUS "
48+ fi
2849
2950cargo test -p bioscript-core --test source_size -- --nocapture
You can’t perform that action at this time.
0 commit comments